#3871: 執行時答案沒有問題 可是解題時是WA(line:1)


jeremy83125 (OX)


#include<cstdlib>
#include<iostream>
using namespace std;
 
int main(int argc,char *argv[])
{
    int a;
    while(cin>>a)
    {
        if(a%4==0)
        {
           if(a%100==0)
           {
                if(a%400==0)
                {
                    cout<<"閏年";
                }
                else
                {
                    cout<<"平年";
                }
            }
            else
            {
                cout<<"閏年";
            }
        }
        else
        {
            cout<<"平年";
        }
    }
    return 0;
}
#3887: Re:執行時答案沒有問題 可是解題時是WA(line:1)


fire231 (Bloodmors)


複製一下別人的回應

Where is your "endl" ?