acgo题库
  • 首页
  • 题库
  • 题单
  • 竞赛
  • 讨论
  • 排行
  • 团队
  • 备赛专区

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
登录
注册
题目详情题解(0)讨论(0)提交记录(0)
  • 做闰年判断题有感

    定义年份再输入,一层模四看整除,一百在,看四百,最后输出就结束。

    userId_undefined

    WA四十AC八十——八十!八十!

    倔强青铜
    0阅读
    0回复
    0点赞
  • 函数

    #include<iostream> using namespace std; bool isLeap(int n){return n%4 == 0&&n%100!=0||n%400==0;} int n; int main(){ cin >> n; cout << (isLeap(n)?"Y":"N") << endl; return 0; }

    userId_undefined

    沈思邈

    秩序白银
    0阅读
    0回复
    0点赞
  • 解题方法

    解题方法如下: #include<iostream> using namespace std; int main(){ int n; cin>>n; if(n%40){ if(n%1000){ if(n%400==0){ cout<<"Y"; }else{ cout<<"N"; } }else{ cout<<"Y"; } }else{ cout<<"N"; } return 0; }

    userId_undefined

    xinyang

    倔强青铜
    0阅读
    0回复
    0点赞
  • Ok呀,这么简单,直接给我坐下

    #include<iostream> using namespace std; int main() { int a; cin>>a; if((a%40 && a%100!=0) || a%4000) { cout<<"Y"<<endl; } else { cout<<"N"<<endl; } return 0; }

    userId_undefined

    eating

    倔强青铜
    0阅读
    0回复
    0点赞
  • 太简单了

    #include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; if(n%40){ if(n%1000){ if(n%400==0){ cout<<"Y"; }else{ cout<<"N"; } }else { cout<<"Y"; } }else{ cout<<"N"; } return 0; } 没意思

    userId_undefined

    137****3652

    倔强青铜
    0阅读
    0回复
    0点赞
  • tijie

    userId_undefined

    正在减肥的吃货

    倔强青铜
    0阅读
    0回复
    0点赞

共126条

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
20条/页
跳至页
首页