Submission #16372

#TimeUsernameProblemLanguageResultExecution timeMemory
16372eaststar새로운 달력 (GCJ12KOR_calendar)C++14
0 / 25
0 ms1084 KiB
#include <stdio.h> int s[110]; int main(){ int i,tc,b,c,t; long long a; scanf("%d",&tc); for(;tc--;){ scanf("%lld%d%d",&a,&b,&c); t=b; for(i=1;i<=c;++i)s[i]=(t+c-1)/c+s[i-1],t=t%c+b; printf("Case #%d: %d\n",i,a/c*s[c]+s[a%c]); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...