fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a;
  5. scanf("%d",&a);
  6. if(a%4)
  7. {
  8. if(a%100)
  9. {
  10. if(a%400)
  11. printf("%dはうるう年です");
  12. else
  13. printf("%dはうるう年ではない");
  14. }
  15. }
  16. else
  17. printf("%dはうるう年ではない");
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 5320KB
stdin
400
stdout
-1773058672はうるう年ではない