結果

問題 No.146 試験監督(1)
ユーザー testestesttestestest
提出日時 2016-05-13 23:18:12
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 41 ms / 1,000 ms
コード長 101 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 20,480 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-15 16:56:18
合計ジャッジ時間 911 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
5,248 KB
testcase_01 AC 41 ms
5,376 KB
testcase_02 AC 41 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:20: warning: return type defaults to ‘int’ [-Wimplicit-int]
    1 | long a,b,s,x=1e9+7;main(i){for(;~scanf("%ld",&b);a=b)i++%2?s-=~a/2%x*(b%x),s%=x:0;a=!printf("%d",s);}
      |                    ^~~~
main.c: In function ‘main’:
main.c:1:20: warning: type of ‘i’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:34: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
    1 | long a,b,s,x=1e9+7;main(i){for(;~scanf("%ld",&b);a=b)i++%2?s-=~a/2%x*(b%x),s%=x:0;a=!printf("%d",s);}
      |                                  ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
  +++ |+#include <stdio.h>
    1 | long a,b,s,x=1e9+7;main(i){for(;~scanf("%ld",&b);a=b)i++%2?s-=~a/2%x*(b%x),s%=x:0;a=!printf("%d",s);}
main.c:1:34: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
    1 | long a,b,s,x=1e9+7;main(i){for(;~scanf("%ld",&b);a=b)i++%2?s-=~a/2%x*(b%x),s%=x:0;a=!printf("%d",s);}
      |                                  ^~~~~
main.c:1:34: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
main.c:1:86: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
    1 | long a,b,s,x=1e9+7;main(i){for(;~scanf("%ld",&b);a=b)i++%2?s-=~a/2%x*(b%x),s%=x:0;a=!printf("%d",s);}
      |                                                                                      ^~~~~~
main.c:1:86: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
main.c:1:86: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
main.c:1:86: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
main.c:1:95: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
    1 | long a,b,s,x=1e9+7;main(i){for(;~scanf("%ld",&b);a=b)i++%2?s-=~a/2%x*(b%x),s%=x:0;a=!printf("%d",s);}

ソースコード

diff #

long a,b,s,x=1e9+7;main(i){for(;~scanf("%ld",&b);a=b)i++%2?s-=~a/2%x*(b%x),s%=x:0;a=!printf("%d",s);}
0