Submission #2117048


Source Code Expand

n,i;double r,s,a;main(m){for(scanf("%lf%d%d",&r,&n,&m);i++<n+m;)s+=2*r*sqrt(1-(a=fmin(fabs(n-2*i),fabs(n-2*(i-m)))/n)*a);printf("%f",s);}

Submission Info

Submission Time
Task B - ステップカット
User kotatsugame
Language C (GCC 5.4.1)
Score 200
Code Size 137 Byte
Status AC
Exec Time 2 ms
Memory 128 KB

Compile Error

./Main.c:1:1: warning: data definition has no type or storage class
 n,i;double r,s,a;main(m){for(scanf("%lf%d%d",&r,&n,&m);i++<n+m;)s+=2*r*sqrt(1-(a=fmin(fabs(n-2*i),fabs(n-2*(i-m)))/n)*a);printf("%f",s);}
 ^
./Main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘n’ [-Wimplicit-int]
./Main.c:1:3: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int]
 n,i;double r,s,a;main(m){for(scanf("%lf%d%d",&r,&n,&m);i++<n+m;)s+=2*r*sqrt(1-(a=fmin(fabs(n-2*i),fabs(n-2*(i-m)))/n)*a);printf("%f",s);}
   ^
./Main.c:1:18: warning: return type defaults to ‘int’ [-Wimplicit-int]
 n,i;double r,s,a;main(m){for(scanf("%lf%d%d",&r,&n,&m);i++<n+m;)s+=2*r*sqrt(1-(a=fmin(fabs(n-2*i),fabs(n-2*(i-m)))/n)*a);printf("%f",s);}
                  ^
./Main.c: In function ‘main’:
./Main.c:1:18: warning: type of ‘m’ defaults to ‘int’ [-Wimplicit-int]
./Main.c:1:30: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
 n,i;double r,s,a;main(m){for(scanf("%lf%d%d",&r,&n,&m);i++<n+m;)s+=2*...

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 16
Set Name Test Cases
Sample 00_example_01.txt, 00_example_02.txt, 00_example_03.txt
All 00_example_01.txt, 00_example_02.txt, 00_example_03.txt, 10_rand_01.txt, 10_rand_02.txt, 10_rand_03.txt, 10_rand_04.txt, 10_rand_05.txt, 10_rand_06.txt, 10_rand_07.txt, 10_rand_08.txt, 20_hand_01.txt, 20_hand_02.txt, 20_hand_03.txt, 20_hand_04.txt, 20_hand_05.txt
Case Name Status Exec Time Memory
00_example_01.txt AC 1 ms 128 KB
00_example_02.txt AC 1 ms 128 KB
00_example_03.txt AC 2 ms 128 KB
10_rand_01.txt AC 1 ms 128 KB
10_rand_02.txt AC 1 ms 128 KB
10_rand_03.txt AC 1 ms 128 KB
10_rand_04.txt AC 1 ms 128 KB
10_rand_05.txt AC 1 ms 128 KB
10_rand_06.txt AC 1 ms 128 KB
10_rand_07.txt AC 1 ms 128 KB
10_rand_08.txt AC 1 ms 128 KB
20_hand_01.txt AC 2 ms 128 KB
20_hand_02.txt AC 2 ms 128 KB
20_hand_03.txt AC 2 ms 128 KB
20_hand_04.txt AC 1 ms 128 KB
20_hand_05.txt AC 1 ms 128 KB