4 条题解

  • 2
    @ 2018-11-07 15:12:23
    #include<iostream>
    using namespace std;
    int n,m,cnt;
    int main()
    {
        cin>>n>>m;
        for(;cnt<m;n++)
        if(n%100==0&&n%400==0||n%4==0&&n%100!=0) cout<<n<<endl,cnt++;
        return 0;
    }
    
  • 1
    @ 2019-03-23 21:28:53
    i=x=int(input())
    y=float(input())
    while y>0:
        if i%4==0 and i%100!=0 or i%400==0:
            print(i)
            y=y-1
        i=i+1
    

    这题下面居然没看到打表大法

  • 0
    @ 2019-06-01 20:25:28
    cur = int(input())
    items = int(input())
    for year in range(cur, 10^99999999999999999999999999999999999999999999):
        if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0:
            print(year)
            items -= 1
        if(not items):
            break
    
    
    
  • -10
    @ 2017-10-27 10:40:11

    y=int(input())
    n=int(input())
    i=0
    while i<n:
    if y%4==0 and y%100!=0:
    print(y)
    y=y+1
    i=i+1
    elif y%400==0:
    print(y)
    y=y+1
    i=i+1
    else:
    y=y+1

  • 1

信息

难度
7
分类
(无)
标签
(无)
递交数
1727
已通过
392
通过率
23%
上传者