Submission #67203


ソースコード

ステータス

項目 データ
問題 0719 - 魔女っ娘ヒナくるん -Magic.01
ユーザー名 ei2119
投稿日時 2021-07-05 18:11:01
言語 C
状態 Compile Error
得点 0
ソースコード長 430 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.c:2:11: error: expected declaration specifiers or ‘...’ before string constant
     scanf("%lld",&n);
           ^~~~~~
./Main.c:2:18: error: expected declaration specifiers or ‘...’ before ‘&’ token
     scanf("%lld",&n);
                  ^
./Main.c:3:15: error: variably modified ‘a’ at file scope
     long long a[n],sum[n+1];
               ^
./Main.c:3:20: error: variably modified ‘sum’ at file scope
     long long a[n],sum[n+1];
                    ^~~
./Main.c:4:5: error: expected identifier or ‘(’ before ‘for’
     for(i=0;i<n;i++){
     ^~~
./Main.c:4:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
     for(i=0;i<n;i++){
              ^
./Main.c:4:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘++’ token
     for(i=0;i<n;i++){
                  ^~
./Main.c:7:5: warning: data definition has no type or storage class
     sum[0]=0;
     ^~~
./Main.c:7:5: warning: type defaults to ‘int’ in declaration of ‘sum’ [-Wimplicit-int]
./Main.c:7:5: error: conflicting types for ‘sum’
./Main.c:3:20: note: previous declaration of ‘sum’ was here
     long long a[n],sum[n+1];
                    ^~~
./Main.c:7:12: error: invalid initializer
     sum[0]=0;
            ^
./Main.c:8:5: error: expected identifier or ‘(’ before ‘for’
     for(i=1;i<=n;i++){
     ^~~
./Main.c:8:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<=’ token
     for(i=1;i<=n;i++){
              ^~
./Main.c:8:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘++’ token
     for(i=1;i<=n;i++){
                   ^~
./Main.c:11:11: error: expected declaration specifiers or ‘...’ before string constant
     scanf("%lld",&q);
           ^~~~~~
./Main.c:11:18: error: expected declaration specifiers or ‘...’ before ‘&’ token
     scanf("%lld",&q);
                  ^
./Main.c:12:15: error: variably modified ‘x’ at file scope
     long long x[q];
               ^
./Main.c:13:5: error: expected identifier or ‘(’ before ‘for’
     for(i=0;i<q;i++){
     ^~~
./Main.c:13:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
     for(i=0;i<q;i++){
              ^
./Main.c:13:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘++’ token
     for(i=0;i<q;i++){
                  ^~
./Main.c:17:5: error: expected identifier or ‘(’ before ‘for’
     for(i=0;i<q;i++){
     ^~~
./Main.c:17:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
     for(i=0;i<q;i++){
              ^
./Main.c:17:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘++’ token
     for(i=0;i<q;i++){
                  ^~
./Main.c:20:5: error: expected identifier or ‘(’ before ‘return’
     return(0);
     ^~~~~~

セット

セット 得点 Cases

テストケース

ファイル名 状態 実行時間 メモリ使用量 #