Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
97967 | 令狐文丽 | 08判断是否为闰年 | C++ | Wrong Answer | 0 MS | 272 KB | 1129 | 2024-11-17 09:31:52 |
#include<iostream>//cin 输入 cout 输出 using namespace std; int main(){ /** if语句 cin输入 cout输出 数据类型: int %d整数 long long %ld char 字符 %c float 小数 double %f %lf bool 真 假 cin>> scanf("%d",&a); cout<< printf("%d",a); **/ /** int a; cin>>a; cout<<a; scanf("%d",&a); printf("%d",a); int a; cin>>a; if (a%2 == 0){ cout<<a; cout<<"是偶数"; } cout<<int('A');//asl 65 cout<<int('a');//97 32 **/ /** char name; cin>>name; if(name >='A' and name <='Z'){ cout<<char(name+32); }else{ if(name >='a' and name <='z'){ cout<<char(name-32); } } int a,x,y; cin>>a>>x>>y;//[x,y] if(a >=x and a <=y){ cout<<"yse"; }else{ cout<<"no"; } **/ //闰年的判断条件 //被400整除 确定是闰年 //被4整除 但是不能被100整除 闰年 % int a; cin>>a; if(a % 400 ==0){ cout<<a<<"Yse"; }else{ if(a%4==0){ if(a % 100 != 0){ cout<<a<<"Yse"; }else{ cout<<a<<"No"; } }else{ cout<<a<<"No"; } } return 0; }
------Input------
3264
------Answer-----
3264 Yes
------Your output-----
3264Yse