# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
30851 | okaybody10 | 채점 시스템 (OJUZ11_judge) | C++98 | 53 ms | 1116 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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); // O(P의 자리수)
long long 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;
}
컴파일 시 표준 에러 (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... |