# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
30850 | okaybody10 | 채점 시스템 (OJUZ11_judge) | C++98 | 1000 ms | 1116 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>
int wkfltn(int n)
{
int cnt=0;
if(n==0)
return 1;
while(n)
{
n/=10;
cnt++;
}
return cnt;
}
int main()
{
int T;
scanf("%d",&T);
while(T--)
{
int S,P;
scanf("%d %d",&P,&S);
int wkfl=wkfltn(P);
int tenpow=1;
for(int i=1;i<=wkfl;i++)
tenpow*=10;
int zerocount=0;
while(1)
{
if(tenpow+P>S)
break;
zerocount++;
tenpow*=10;
}
printf("%d\n",zerocount);
}
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |