fork(2) download
  1. // Days (A), by Errichto
  2. #include<bits/stdc++.h>
  3. using namespace std;
  4.  
  5. int main() {
  6. int x;
  7. scanf("%d", &x);
  8. char sl[15];
  9. scanf("%s", sl);
  10. scanf("%s", sl);
  11. if(sl[0] == 'w') {
  12. if(x == 5 || x == 6) puts("53");
  13. else puts("52");
  14. return 0;
  15. }
  16. if(x <= 29) puts("12");
  17. else if(x <= 30) puts("11");
  18. else puts("7");
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 3464KB
stdin
Standard input is empty
stdout
7