【CodeForces】[659A]New Year and Days
2016-07-21 15:40
369 查看
找规律题目
已知平年有52周零1天
闰年有52周零2天
2016年为闰年,并且第一天为周五
所以一年有53个周五周六,其余为52
一年有12个月有29号
一年有11个月有30号
一年有7个月有31号
#include<stdio.h> int main() { int n; char s[10]; while(scanf("%d of %s",&n,s)!=EOF) { if(s[0]=='w') printf("%d\n",n==5||n==6?53:52); else printf("%d\n",n<30?12:(n==30?11:7)); } return 0; }
题目地址:【CodeForces】[659A]New Year and Days
相关文章推荐
- Codeforces Round #197 (Div. 2)
- Codeforces Round #198 (Div. 1)
- Codeforces 405E Codeforces Round #238 (Div. 2)E
- Codeforces 407C Codeforces Round #239 (Div. 1)C
- CodeForces 449A - Jzzhu and Chocolate
- CodeForces 449 B. Jzzhu and Cities
- codeforces 618C. Constellation
- Codeforces Round #349 (Div. 2) - C
- Codeforces Round #361 (Div. 2)
- 7.13Codeforces Round #360 (Div. 2)
- Codeforces Round #363 (Div. 2)
- Codeforces Round #265 (Div. 2)
- Codeforces #310 div2 C. Case of Matryoshkas
- 状态压缩DP codeforces 244 Problem C. The Brand New Function 和 codeforces 165 E. Compatible Numbers
- codeforces 16 Problem E fish
- Codeforces Round332 部分题解
- CodeForces 603A_Alternative Thinking (DP)
- CodeForces 602B_Approximating a Constant Range_DP
- Codeforces round #247 for Div. 2
- Codeforces Round #246 (Div. 2)