CodeForces 611 A. New Year and Days(水~)
来源:互联网 发布:大众软件 故事合集 编辑:程序博客网 时间:2024/05/16 17:12
Description
两种询问问每周和每月的第x天在2016年有几个
Input
两种询问
x of week(1<=x<=7)
x of month(1<=x<=31)
Output
输出每周和每月的第x天在2016年有几个
Sample Input
4 of week
Sample Output
52
Solution
水题~
Code
#include<cstdio>#include<iostream>#include<cstring>using namespace std;int d;char s1[3],s2[6];int main(){ while(~scanf("%d%s%s",&d,s1,s2)) { if(s2[0]=='w') { if(d==5||d==6)printf("53\n"); else printf("52\n"); } else { if(d<=29)printf("12\n"); else if(d==30)printf("11\n"); else if(d==31)printf("7\n"); } } return 0;}
0 0
- CodeForces 611 A. New Year and Days(水~)
- 【CodeForces】611A - New Year and Days(水)
- 【Codeforces】-611A-New Year and Days(水)
- CodeForces 611A New Year and Days
- CodeForces 611A New Year and Days
- 【CodeForces 611A】New Year and Days
- codeforces 611A New Year and Days
- 【CodeForces】[659A]New Year and Days
- Codeforces New Year and Days
- 【codeforces】New Year and Days
- 【codeforces】New Year and Days
- Codeforces Good Bye 2015 A. New Year and Days (水)
- A. New Year and Days
- Codeforces Good Bye 2015 A. New Year and Days
- New Year and Days
- New Year and Days
- New Year and Days
- New Year and Days
- Android 实现形态各异的双向侧滑菜单 自定义控件来袭
- Centos编译安装PHP7+Nginx1.9+MySQL5.7
- UVA 1600 Patrol Robot
- corn表达式——用于设置定时任务
- iOS 开发 本地通知的使用
- CodeForces 611 A. New Year and Days(水~)
- Java设计模式--策略模式
- web项目初始化操作
- Android Audio Framework 之AudioPolicyService
- Unity3D 5 官方教程:地形引擎
- 深入理解jquery新的绑定事件机制on方法的使用
- IT公司面试题系列一
- UVA 804 Petri Net Simulation
- Drupal主题选粹