# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
5874 | baneling100 | 새로운 달력 (GCJ12KOR_calendar) | C++98 | 0 ms | 1088 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
long long t, month, day, week, a[101], len, sum, ans;
void input(void)
{
scanf("%lld %lld %lld",&month,&day,&week);
len=sum=ans=0;
}
void process(void)
{
long long i, x=day;
while(1)
{
a[++len]=(x+week-1)/week;
x+=(day%week);
if(x>=day+week)
x-=week;
if(x==day)
break;
}
for(i=1 ; i<=len ; i++)
sum+=a[i];
ans+=sum*(month/len);
for(i=1 ; i<=month%len ; i++)
ans+=a[i];
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |