fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int t;
  5. scanf("%d", &t);
  6. for (int i = 0; i < t; i++) {
  7. int year;
  8. scanf("%d", &year);
  9. if (year % 400 == 0)
  10. printf("a leap year\n");
  11. else if (year % 4 == 0 && year % 100 != 0)
  12. printf("a leap year\n");
  13. else
  14. printf("a normal year\n");
  15. }
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0.01s 5292KB
stdin
4
1992
1993
1900
2000
stdout
a leap year
a normal year
a normal year
a leap year