fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int a;
  7. while(cin>>a){
  8. if(a%400==0||(a%4==0&&a%100!=0))cout<<"閏年\n";
  9. else cout<<"平年\n";
  10. }
  11. return 0;
  12. }
Success #stdin #stdout 0.01s 5288KB
stdin
300
6
56
728
400
stdout
平年
平年
閏年
閏年
閏年