#include <cstdio>
int main()
{
int x, d, h, m;
scanf("%d %d %d %d", &x, &d, &h, &m);
printf("%d", (576 - h + (x - d) * 24) * 60 - m + (x == 5) * 1440 - (x == 5 && (d < 29 || (d == 29 && h < 3))) * 60);
return(0);
}
1 2 3 4 5 6 7 8 | #include <cstdio> int main() { int x, d, h, m; scanf("%d %d %d %d", &x, &d, &h, &m); printf("%d", (576 - h + (x - d) * 24) * 60 - m + (x == 5) * 1440 - (x == 5 && (d < 29 || (d == 29 && h < 3))) * 60); return(0); } |
English