Submission #16371

# Submission time Handle Problem Language Result Execution time Memory
16371 2015-08-21T17:20:58 Z eaststar 새로운 달력 (GCJ12KOR_calendar) C++14
10 / 25
1000 ms 1084 KB
#include <stdio.h>
int main(){
    int i,tc,a,b,c,s,t;
    scanf("%d",&tc);
    for(i=1;i<=tc;++i){
        scanf("%d%d%d",&a,&b,&c);
        s=0,t=b;
        for(;a--;)s+=(t+c-1)/c,t=t%c+b;
        printf("Case #%d: %d\n",i,s);
    }
    return 0;
}
# 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 1080 KB Program timed out