當(dāng)前位置:
首頁(yè) >
(HDU)1491-- Octorber 21st (校庆)
發(fā)布時(shí)間:2023/12/20
41
豆豆
生活随笔
收集整理的這篇文章主要介紹了
(HDU)1491-- Octorber 21st (校庆)
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
題目鏈接:https://vjudge.net/problem/HDU-1491
1 #include <cstdio> 2 #include <cstring> 3 #include <cmath> 4 #include <iostream> 5 #include <algorithm> 6 #include <string> 7 #include <cstdlib> 8 9 using namespace std; 10 11 int main() 12 { 13 int a[11]={0,31,28,31,30,31,30,31,31,30}; 14 int t; 15 while(cin>>t) 16 { 17 for(int i=0;i<t;i++) 18 { 19 int sum=0; 20 int n,m; 21 scanf("%d %d",&n,&m); 22 if(((n==10)&&(m>21))||n>10) printf("What a pity, it has passed!\n"); 23 else if(n==10&&m==21) printf("It's today!!\n"); 24 else 25 { 26 for(int i=n;i<10;i++) 27 sum+=a[i]; 28 sum=sum+21-m; 29 printf("%d\n",sum); 30 } 31 } 32 } 33 return 0; 34 }?
轉(zhuǎn)載于:https://www.cnblogs.com/ACDoge/p/6141534.html
總結(jié)
以上是生活随笔為你收集整理的(HDU)1491-- Octorber 21st (校庆)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: js获取浏览器语言(ie、ff、chro
- 下一篇: 12月9日 perform使用入门