Submission #2200793


Source Code Expand

long a,b;
main(){
	scanf("%ld%ld",&a,&b);
	printf("%.lf\n",1+log2(b/a));
}

Submission Info

Submission Time
Task C - Multiple Gift
User kotatsugame
Language C (GCC 5.4.1)
Score 0
Code Size 78 Byte
Status WA
Exec Time 3 ms
Memory 384 KB

Compile Error

./Main.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 main(){
 ^
./Main.c: In function ‘main’:
./Main.c:3:2: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
  scanf("%ld%ld",&a,&b);
  ^
./Main.c:3:2: warning: incompatible implicit declaration of built-in function ‘scanf’
./Main.c:3:2: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
./Main.c:4:2: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
  printf("%.lf\n",1+log2(b/a));
  ^
./Main.c:4:2: warning: incompatible implicit declaration of built-in function ‘printf’
./Main.c:4:2: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
./Main.c:4:20: warning: implicit declaration of function ‘log2’ [-Wimplicit-function-declaration]
  printf("%.lf\n",1+log2(b/a));
                    ^
./Main.c:4:20: warning: incompatible implicit declaration of built-in function ‘log2’
./Main.c:4:20: note: include ‘<math.h>’ or provide a declaration of ‘log2’

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 2
WA × 1
AC × 8
WA × 7
Set Name Test Cases
Sample s1.txt, s2.txt, s3.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, s1.txt, s2.txt, s3.txt
Case Name Status Exec Time Memory
01.txt WA 3 ms 384 KB
02.txt WA 1 ms 128 KB
03.txt AC 1 ms 128 KB
04.txt WA 1 ms 128 KB
05.txt AC 1 ms 128 KB
06.txt WA 1 ms 128 KB
07.txt WA 1 ms 128 KB
08.txt AC 1 ms 128 KB
09.txt AC 1 ms 128 KB
10.txt AC 1 ms 128 KB
11.txt AC 1 ms 128 KB
12.txt WA 1 ms 128 KB
s1.txt WA 1 ms 128 KB
s2.txt AC 1 ms 128 KB
s3.txt AC 1 ms 128 KB