#include <iostream>
using namespace std;
int main(){
int y;
while(cin>>y){
if(y%400==0){
cout<<"閏年"<<endl;
}
else if(y%400!=0&&y%100==0){
cout<<"平年"<<endl;
}
else if(y%100!=0&&y%4==0){
cout<<"閏年"<<endl;
}
else{
cout<<"平年"<<endl;
}
return 0;
}
}
ps.一直出現WA
#include <iostream>
using namespace std;
int main()
{
int y;
while(cin>>y)
{
if(y%400==0)
{
cout<<"閏年"<<endl;
}
else if(y%400!=0&&y%100==0)
{
cout<<"平年"<<endl;
}
else if(y%100!=0&&y%4==0)
{
cout<<"閏年"<<endl;
}
else
{
cout<<"平年"<<endl;
}
}
return 0;
/*} <-往上移到 return 0; 上方 */
}