WOJ-351 Olympic

编程知识 更新时间:2023-04-03 19:54:37

“One World One Dream” fully reflects the essence and the universal values of the Olympic spirit ---- Unity, Friendship, Progress, Harmony,
Participation and Dream. It expresses the common wishes of people all over the world, inspired by the Olympic ideals, to strive for a bright future
of Mankind. In spite of the differences in colors, languages and races, we share the charm and joy of the Olympic Games, and together we seek for the ideal of Mankind for peace. We belong to the same world and we share the same aspirations and dreams.

“One World One Dream” is a profound manifestation of the core concepts of the Beijing Olympic Games. It reflects the values of harmony connoted in the concept of “People’s Olympics”, the core and soul of the three concepts – “Green Olympics, High-tech Olympics and People’s Olympics”.
While “Harmony of Man with Nature” and “Peace Enjoys Priority” are the philosophies and ideals of the Chinese people since ancient times in their pursuit of the harmony between Man and Nature and the harmony among people, building up a harmonious society and achieving harmonious
development are the dream and aspirations of ours. It is our belief that peace and progress, harmonious development, living in amity, cooperation and mutual benefit, and enjoying a happy life are the common ideals of the people throughout the world.

“One World, One Dream” is simple in expressions, but profound in meaning. It is of China, and also of the world. It conveys the lofty ideal of the
people in Beijing as well as in China to share the global community and civilization and to create a bright future hand in hand with the people from the rest of the world. It expresses the firm belief of a great nation, with a long history of 5,000 years and on its way towards modernization, that
is committed to peaceful development, harmonious society and people’s happiness. It voices the aspirations of 1.3 billion Chinese people to
contribute to the establishment of a peaceful and bright world.

The English translation of the slogan is distinctive in sentence structure. The two "One"s are perfectly used in parallel, and the words “World” and “Dream” form a good match. The slogan is simple, meaningful, inspiring, and easy to remember, read and spread.

In Chinese, the word “tongyi”, which means “the same”, is used for the English word “One”. It highlights the theme of “the whole Mankind lives in the same world and seeks for the same dream and ideal”.

Please help us write a program to count down days to the upcoming Beijing 2008 Olympic games.

输入格式

The first line contains an integer T indicating the number of test cases.
In the next T lines, each line contains two integers “month” and “day” indicating one day in the future.

输出格式

Output T lines. Each line contains an integer indicating the number of days.

样例输入

1
3 15

样例输出

146

提示

Don’t know when the Olympic begins?
Just refer to the sample test case.

说了那么多其实很简单,问的是08年的日期离8月8有多久,直接case语句都能做

#include<stdio.h>
int main(){
	int T;
	scanf("%d",&T);
	for(int i=0;i<T;i++){
		int M,D;
		scanf("%d %d",&M,&D);
		switch(M){
			case 8: printf("%d\n",8-D); break;
			case 7: printf("%d\n",39-D); break;
			case 6: printf("%d\n",69-D); break;
			case 5: printf("%d\n",100-D); break;
			case 4: printf("%d\n",130-D); break;
			case 3: printf("%d\n",161-D); break;
			case 2: printf("%d\n",190-D); break;
			case 1: printf("%d\n",221-D); break;
			default: return 1; break;
		}		
	}
	return 0;
}

更多推荐

WOJ-351 Olympic

本文发布于:2023-04-03 19:54:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/c7aee002d45c3c885b7ff1cc6685f673.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:WOJ   Olympic

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 39840文章数
  • 14阅读数
  • 0评论数