Problem Statement

A sport event is held in June of every year whose remainder when divided by $4$ is $2$.

Suppose that it is now January of the year $Y$. In what year will this sport event be held next time?

Constraints

  • $2000 \leq Y \leq 3000$
  • $Y$ is an integer.

Input

Input is given from Standard Input in the following format:

$Y$

Output

Print the answer.


Sample Input 1

2022

Sample Output 1

2022

The remainder when $2022$ is divided by $4$ is $2$, so if it is now January of $2022$, the next games will be held in June of the same year.


Sample Input 2

2023

Sample Output 2

2026

Sample Input 3

3000

Sample Output 3

3002

模拟即可。

#include<cstdio>
int y;
int main()
{
scanf("%d",&y);
if(y%4==3)
printf("%d",y+3);
else
printf("%d",y+(2-y%4));
}

[ABC262A] World Cup的更多相关文章

  1. java高cup占用解决方案

    项目中发现java cpu占用高达百分之四百,查看代码发现有一个线程在空转,拉高了cup while(true){ } 解决方案,循环中加入延迟:Thread.sleep(Time): 总结下排查CP ...

  2. UVALive 7147 World Cup(数学+贪心)(2014 Asia Shanghai Regional Contest)

    题目链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&category=6 ...

  3. uva 6757 Cup of Cowards(中途相遇法,貌似)

    uva 6757 Cup of CowardsCup of Cowards (CoC) is a role playing game that has 5 different characters (M ...

  4. 【转】关于KDD Cup '99 数据集的警告,希望从事相关工作的伙伴注意

    Features From: Terry Brugger Date: 15 Sep 2007 Subject: KDD Cup '99 dataset (Network Intrusion) cons ...

  5. Facebook Hacker Cup 2014 Qualification Round 竞赛试题 Square Detector 解题报告

    Facebook Hacker Cup 2014 Qualification Round比赛Square Detector题的解题报告.单击这里打开题目链接(国内访问需要那个,你懂的). 原题如下: ...

  6. DP VK Cup 2012 Qualification Round D. Palindrome pairs

    题目地址:http://blog.csdn.net/shiyuankongbu/article/details/10004443 /* 题意:在i前面找回文子串,在i后面找回文子串相互配对,问有几对 ...

  7. [BZOJ 3145][Feyat cup 1.5]Str 解题报告

    [Feyat cup 1.5]Str DescriptionArcueid,白姬,真祖的公主.在和推倒贵看电影时突然对一个问题产生了兴趣:我们都知道真祖和死徒是有类似的地方.那么从现代科学的角度如何解 ...

  8. HDU 2289 CUP 二分

    Cup Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submiss ...

  9. VK Cup 2012 Round 3 (Unofficial Div. 2 Edition)

    VK Cup 2012 Round 3 (Unofficial Div. 2 Edition) 代码 VK Cup 2012 Round 3 (Unofficial Div. 2 Edition) A ...

  10. UVALive 7275 Dice Cup (水题)

    Dice Cup 题目链接: http://acm.hust.edu.cn/vjudge/contest/127406#problem/D Description In many table-top ...

随机推荐

  1. LDAP:如何在windows系统下安装LDAP及连接测试

    1.LDAP介绍 LDAP是一个基于X.500标准的轻量目录访问协议,与X.500不同,LDAP协议支持TCP/IP连接.全称为Lightweight Directory Access Protoco ...

  2. 作为一个客户经理你一个如何给客户介绍API接口

    随着科技的发展,API(Application Programming Interface,应用程序接口)的应用已经逐渐普及,而API接口作为现代企业实现智能化运营和管理的重要工具之一,也备受关注.作 ...

  3. CodeForces-1324E-Sleeping-Schedule

    题意 \(Vova\)有一个睡眠时间表,一天有\(h\)小时,\(Vova\)会睡\(n\)次觉,一次睡一天,在第\(i-1\)次睡醒后,\(Vova\)在\(a_i\)或\(a_i-1\)个小时候可 ...

  4. Git命令详细使用指南

    Git命令详细使用指南 Git是一种广泛使用的版本控制系统,它可以帮助开发人员跟踪变更.协作项目和有效管理代码仓库.无论你是初学者还是有经验的用户,理解各种Git命令对于高效的代码管理至关重要. 安装 ...

  5. Unity 性能优化Shader分析处理函数:ShaderUtil.GetShaderGlobalKeywords用法

    Unity 性能优化Shader分析处理函数:ShaderUtil.GetShaderGlobalKeywords用法 点击封面跳转下载页面 简介 Unity 性能优化Shader分析处理函数:Sha ...

  6. Python ChatGPT Telegram Bot

    注册 这里如何注册我就不说明了,大家自行去注册,主要是现在GPT的基本上已经备用很多了,导致了接码的价格也上涨了,而且使用token的话,其实还是很快可以用完免费的18美金: 接码:https://s ...

  7. 两个例子带你入门 Disruptor

    Disruptor 是英国外汇交易公司 LMAX 开发的一个高性能队列.很多知名开源项目里,比如 canal .log4j2. storm 都是用了 Disruptor 以提升系统性能 . 这篇文章, ...

  8. Solution -「洛谷 P3773」「CTSC 2017」吉夫特

    Description Link. 求满足 \[\prod _{i=2}^{k} \binom{a_{b_{i-1}}}{a_{b_i}} \mod 2 = \binom{a_{b_1}}{a_{b_ ...

  9. Merge-Lrc 合并歌词的小工具

    Merge-Lrc 背景 音乐区有群友希望各种乱七八糟的歌词(lrc 格式居多,里面甚至还有翻译)可以整理成单一的文件,或者一个仅翻译的歌词可以和原文的歌词合并.于是就开发了这款工具.地址:https ...

  10. CodeTON Round 4 (Div. 1 + Div. 2)C

    C. Make It Permutation 我们希望尽可能少地进行操作可以使代价最小,我们如果要排列的话,那些重复的元素我们无论如何都要进行删除的,所以我们可以先把去重的代价计算出来,然后依次枚举排 ...