竞赛
考级
#include <bits/stdc++.h> using namespace std; void baron(int a){ if(a%40&&a%100!=0||a%4000){ cout<<"YES"; }else{ cout<<"NO"; } } int main() { int a; cin>>a; baron(a); return 0; }
琮
法外狂徒-张三
全网保姆级教学来啦!!! 首先,我们需要知道闰年是如何判断的。 大家小学时就学过:四年一闰,百年不闰,四百年再闰。 so,我们可以写出最重要的代码: 那么现在就可以写代码了。 因为这章是函数,所以我们写一个函数runnian(n) 完整代码(有几处错误,直接复制不能AC呦!): 好,代码看完,点的赞再走吧,花了我114514年才写好的
哇,我传伞太准了!
又是不想做题的一天呐……
#include<iostream> using namespace std; bool runnian(int a){ if((a%40&&a%100!=0)||(a%1000&&a%400==0)){ return true; }else{ return false; } } int main(){ int n; cin>>n; if(runnian(n)==true){ cout<<"YES"; }else{ cout<<"NO"; } return 0; }
Arena Breakout
点个关注!
信奥--小潘 CPZT ACGO
//别问我为啥来个提示,因为我就被这大小写坑了!!! #include<iostream> using namespace std; int n; bool check(int n){ return ((n%4 == 0 && n%100 != 0) || (n%400 == 0)); } int main(){ cin >> n; cout << (check(n) ? "YES\n" : "NO\n");//注意,不要写成小写。 return 0; }
一个人
对方正在输入...
#include<bits/stdc++.h> using namespace std; int s(int a,int b,int c){ if(a>b&&a>c){ return a; } else if(b>a&&b>c){ return b; } else{ return c; } } int main(){ int a,b,c; cin>>a>>b>>c; cout<<s(a,b,c); return 0; }
~
YuQing1919
JMZ詹总
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; if( (n % 4 == 0 && n % 100 != 0) || (n % 400 == 0)){ cout << "YES"; }else{ cout << "NO"; } return 0; }
娃哈哈不吃AD钙奶
#include<iostream> using namespace std; int main(){ }
luna
151****9879
芙厨(互关)
a=int(input()) if a%40 and a%100!=0: print("YES") elif a%1000 and a%400==0: print("YES") else: print("NO")
135****1834
黑客_天之神_ZDZL_zsy
programmerGYM
#include<bits/stdc++.h> using namespace std; int main(){ int x; cin>>x; if(x%40&&x%100!=0||x%4000){ cout<<"YES"; } else{ cout<<"NO"; } return 0; }
天之神-四月
枫岚