# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
14438 | 2015-05-16T06:21:30 Z | gs14004 | 새로운 달력 (GCJ12KOR_calendar) | C++14 | 1000 ms | 1084 KB |
#include <cstdio> void solve(){ int a,b,c; scanf("%d %d %d",&a,&b,&c); int piv = 0, ret = 0; for (int i=0; i<a; i++) { ret += (piv + b + c - 1) / c; piv += b % c; piv %= c; } printf("%d\n",ret); } int main(){ int t; scanf("%d",&t); for (int i=1; i<=t; i++) { printf("Case #%d: ",i); solve(); } }
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 1084 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1000 ms | 1084 KB | Program timed out |