Problem Description
Fuzhou University is the national 211 Project focused on building universities, founded in 1958, has become one one of the Fujian Provincial key university which is mainly Polytechnic combination of science, engineering, economic and management, literature, law, arts and other multidisciplinary coordinated development. This year's October 25 is the 50th anniversary celebration of the school. Now, your task is to help the group of teachers who are busy preparing for the celebration calculate the left time to the nearest celebration.
Input
The first line is a positive number N (N <= 2000), N indicates the number of test data. The following N lines, each line has three positive integer, Y, M, D that were year, month, day time respectively, the three integers are separated by a space, we guarantee the date is legitimate(1958<= Y <= 3000).
Output
According to input data, you must calculate the left time to the nearest celebration. If the most recent session celebration is N, the left time to the nearest celebration is M, so we must output:
“M days left for celebrating the Nth anniversary of the founding of Fuzhou University!” (quotes for clarity only).
Sample Input
3
2008 10 24
2008 10 25
2008 10 26
Sample Output
1 days left for celebrating the 50th anniversary of the founding of Fuzhou University!
0 days left for celebrating the 50th anniversary of the founding of Fuzhou University!
364 days left for celebrating the 51th anniversary of the founding of Fuzhou University!
题目的意思就是对于一个给定的年份,
求它离最近的校庆还有多少天, 并计算出是第几周年校庆...
//郁闷啊, 竟然把求闰年的公式记错, 写成 ,wa了好几次!!!
相关推荐
代Un的还没被Ac,其余不保证算法够好,只是随便传传
给定一个自然数n,由n开始可以依次产生半数集set(n)中的数如下。 (1)n∈set(n); (2)在n的左边加上一个自然数,但该自然数不能超过最近添加的数的一半; (3)按此规则进行处理,直到不能再添加自然数为止。...
FOJ(大部分标程) ACMFOJ(大部分标程) ACMFOJ(大部分标程) ACMFOJ(大部分标程) ACMFOJ(大部分标程) ACMFOJ(大部分标程) ACM
第一次上传东西... 本人是个初学者,希望大家多多指教
Source code example for shortcuts to create arbitrary files on the command line