acm 2005
////////////////////////////////////////////////////////////////////////////////
#include<iostream>
using namespace std;
int main(int argc,char * argv)
{
int year,month,day;
char ch ='/'; //间隔符
int dayofmonth[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
while(cin>>year>>ch>>month>>ch>>day)
{
int cnt = day;
if((year % 4 == 0 && year %100 != 0 ) || (year % 400 == 0)) //闰年
{
dayofmonth[1] = 29;
}
else
{
dayofmonth[1] = 28;
}
for(int i = 0;i<month - 1;++i)
{
cnt = dayofmonth[i] + cnt;
}
cout<<cnt<<endl;
}
return 0;
}
/////////////////////////////////////////////////////////////////////////////
acm 2005的更多相关文章
- ACM 2003~2005
ACM 2003 求实数的绝对值 import java.util.Scanner; public class Lengxc { public static void main(String[] ar ...
- Eddy's problem partI
Eddy's mistakes[HDU1161] Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java ...
- HDOJ/HDU 1161 Eddy's mistakes(大写字母转换成小写字母)
Problem Description Eddy usually writes articles ,but he likes mixing the English letter uses, for e ...
- hdu1161Eddy's mistakes
Problem Description Eddy usually writes articles ,but he likes mixing the English letter uses, for e ...
- Eddy's mistakes(字母大小写转换)strlwr函数的应用
Problem Description Eddy usually writes articles ,but he likes mixing the English letter uses, for ...
- HDU字符串基础题(1020,1039,1062,1088,1161,1200,2017)
并不是很精简,随便改改A过了就没有再简化了. 1020. Problem Description Given a string containing only 'A' - 'Z', we could ...
- HDU1161 Eddy's mistakes
Eddy's mistakes Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...
- Eddy's mistakes
Problem Description Eddy usually writes articles ,but he likes mixing the English letter uses, for ...
- Information Cartography
作者:Dafna Shahaf 会议:ACM 2015. 研究大背景:自动化地从很大数据集中提取结构化的知识变得越来越难.在本篇文章中,我们将探索我们在文献中(25,26,27)中创立的方法来自 ...
随机推荐
- shell脚本学习之参数传递
shell之参数传递 我们可以在执行 Shell 脚本时,向脚本传递参数,脚本内获取参数的格式为:$n.n 代表一个数字,1 为执行脚本的第一个参数,2 为执行脚本的第二个参数,以此类推…… 实例 以 ...
- SpringBoot document notes
图片拷贝不过来,直接从github上下载 . 链接: https://github.com/DFX339/SpringBootDocumentNotes.git Create a example po ...
- windows上dubbo-admin的安装
dubbo-admin的安装 (1)先下载好zookeeper包,因为启动dubbo-admin时需要先启动zookeeper zookeeper:dubbo的注册中心(自己下载 ,找到bin目录下的 ...
- MySQL远程登陆
mysql:连接数据库 1.连接到本机上的MYSQL 命令:mysql -u [username] -p username:用户名 命令示例:mysql -u root -p,回车后提示你输密码. 2 ...
- Remove duplicates from array
//Given a sorted array, remove the duplicates in place such that each element appear only // once an ...
- SQL-21 查找所有员工自入职以来的薪水涨幅情况,给出员工编号emp_no以及其对应的薪水涨幅growth,并按照growth进行升序
题目描述 查找所有员工自入职以来的薪水涨幅情况,给出员工编号emp_no以及其对应的薪水涨幅growth,并按照growth进行升序CREATE TABLE `employees` (`emp_no` ...
- ajax之同步异步详解
同步:一堆任务,按顺序去执行,只能一件件的来,如一个厨师做菜 异步:一堆任务,可以同时进行,如多个厨师做菜 ...
- hdu 5228 OO’s Sequence(单独取数算贡献)
Problem Description OO has got a array A of size n ,defined a function f(l,r) represent the number o ...
- 实力封装:Unity打包AssetBundle(二)
→前情提要:Unity最基本的AssetBundle打包方式. 第二种打包方式 Unity提供的BuildAssetBundles API还有一个重载形式,看下面↓↓ public static As ...
- Java读取键盘输入
三种方法分别如下: 方法一:从控制台接收一个字符,然后将其打印出来 import java.io.*; public static void main(String [] args) throws I ...