結果
問題 | No.146 試験監督(1) |
ユーザー | testestest |
提出日時 | 2017-01-24 16:28:11 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 41 ms / 1,000 ms |
コード長 | 99 bytes |
コンパイル時間 | 299 ms |
コンパイル使用メモリ | 20,480 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-02 11:03:38 |
合計ジャッジ時間 | 1,748 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 41 ms
5,248 KB |
testcase_01 | AC | 39 ms
5,376 KB |
testcase_02 | AC | 40 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/2%x)i++%2?s-=b%x*a,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/2%x)i++%2?s-=b%x*a,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/2%x)i++%2?s-=b%x*a,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/2%x)i++%2?s-=b%x*a,s%=x:0;a=!printf("%d",s);} | ^~~~~ main.c:1:34: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:1:84: 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/2%x)i++%2?s-=b%x*a,s%=x:0;a=!printf("%d",s);} | ^~~~~~ main.c:1:84: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:1:84: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] main.c:1:84: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:1:93: 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/2%x)i++%2?s-=b%x*a,s%=x:0;a=!printf("%d",s);} |
ソースコード
long a,b,s,x=1e9+7;main(i){for(;~scanf("%ld",&b);a=~b/2%x)i++%2?s-=b%x*a,s%=x:0;a=!printf("%d",s);}