fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int n,i;
  5. scanf("%d",&n);
  6. for(i=n+1; i<2021; i++)
  7. {
  8. if(((i%4==0)||(i%400==0) && (i%100 !=0)))
  9. {
  10. printf("%d\n",i);
  11. }
  12. }
  13. if(n>=2020){
  14. printf("Oops!\n");
  15. }
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 5428KB
stdin
2000
stdout
2004
2008
2012
2016
2020