Last active
November 5, 2019 08:24
-
-
Save pinglunliao/b0e12b84eb84dd24a404 to your computer and use it in GitHub Desktop.
a004: 文文的求婚 FYI: https://yunlinsong.blogspot.com/2016/01/blog-post_95.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
short y; | |
while(cin >> y){ | |
y = (y % 4 == 0 && y % 100 != 0) || (y % 400 == 0); | |
cout << (y == 1?"閏年":"平年") << endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment