当前位置:网站首页>ACM纪念日 C语言
ACM纪念日 C语言
2022-04-21 18:16:00 【大菜彩】
ACM纪念日
ACM国际大学生程序设计竞赛是世界上公认的规模最大、水平最高的全球大学生程序设计竞赛,旨在展示大学生创新能力、团队精神和在压力下编写程序、分析和解决问题能力的年度竞赛,目标是培养新一代科学与信息技术领域的人才。该项赛事被誉为计算机软件领域的奥林匹克。
2018年10月28日,第43届ACM国际大学生程序设计竞赛(徐州站)在中国矿业大学举行,临沂大学信息科学与工程学院王奔、刘峻東、王亚平组成的“瓜皮王国里的三个瓜皮小战士”队在此次竞赛中获得铜牌,实现了临沂大学在此项赛事中零的突破。

ACM教练将2018年10月28日称为ACM纪念日,此后每年ACM实验室纳新时都要计算一下离此纪念日已经过了多少天。已知临沂大学ACM实验室纳新总是在10月份进行,请你帮助教练计算下某年纳新时离纪念日已经过了多少天。
输入格式:
输入格式为yyyy-10-dd,其中yyyy表示年份,dd表示月份,且yyyy>2018,1≤dd≤31。
输出格式:
输出一个正整数表示答案。
输入样例:
2020-10-30
输出样例:
733
代码:
#include<stdio.h>
int main()
{
int year,month,day,day1=0;
scanf("%d-%d-%d",&year,&month,&day);
for(int i=year;i>2018;i--)
{
if(((i%4==0)&&(i%100!=0))||(i%400==0)) //闰年
day1=day1+366;
else //平年
day1=day1+365;
}
day1=day1+day-28;
printf("%d",day1);
return 0;
}
版权声明
本文为[大菜彩]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_53786696/article/details/124326519
边栏推荐
- 靶机渗透练习80-Momentum:1
- Don't look for it. This is the clearest article on microservices so far! No one
- [intensive reading of Thesis] stable linear structures and seam measurements for parallelax image stitching
- Huawei, TCL, Dajiang
- Reptile case 01
- 2022超星学习通《新伦理学》答案
- 单例模式你不得不知道的底层原理
- [pytorch image classification] RESNET network structure
- How to use serialization and deserialization of JSON in golang
- C语言进阶第46式:函数与宏分析
猜你喜欢

Porting openharmony and adding WiFi driver

终于有人讲明白了!原来这才是全球低时延一张网技术

为拿几家大厂Offer,“闭关修炼
![[牛客网刷题 Day4] JZ76 删除链表中重复的结点(递归)](/img/d7/c8e5b575ea93ba170c994e70b4e1cb.png)
[牛客网刷题 Day4] JZ76 删除链表中重复的结点(递归)

Shallow comparison between oceanbase and tidb - implementation plan

Advanced formula 46 of C language: function and macro analysis

php如何去除首位数字

Laravel soar (2. X) - automatically monitor and output SQL optimization suggestions and assist laravel to apply SQL optimization

【NPJ|数字医药】医学影像的机器学习:方法学的失败和对未来的建议

The upper computer is fun to play like this!
随机推荐
MySQL - remote connection to non local MySQL database server, Error 1130: host 192.168.3.100 is not allowed to connect to this MySQL s
[brush force buckle] questions 51-60
华为、TCL、大疆
【论文精读】Stable Linear Structures and Seam Measurements for Parallax Image Stitching
Appreciation of single chip microcomputer DIY works, beginners come in to worship
【acwing】165. 小猫爬山(DFS之剪枝)
[牛客网刷题 Day4] JZ76 删除链表中重复的结点(递归)
干货|app自动化之如何参数化用例
国泰君安安全吗?靠谱嘛
Mycat水平分表(E-R表)
Q: Making line chart with Excel
Target penetration exercise 72-dc4
【论文精读】Perception-based seam cutting for image stitching
Finally complete the dream of student age - make a handheld machine and teach you with single chip microcomputer STM32
Live broadcast with goods source code, different writing methods of gradient status bar
教你轻松解决CSRF跨站请求伪造攻击
包装类
历经4轮2小时,终于斩下美团offer!
接口
laravel-soar(2.x) - 自动监控输出 SQL 优化建议、辅助 laravel 应用 SQL 优化