結果
問題 | No.638 Sum of "not power of 2" |
ユーザー | kotatsugame |
提出日時 | 2018-01-28 02:31:45 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 163 bytes |
コンパイル時間 | 1,073 ms |
コンパイル使用メモリ | 28,544 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-09 13:34:09 |
合計ジャッジ時間 | 1,693 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,248 KB |
testcase_02 | AC | 1 ms
5,376 KB |
testcase_03 | AC | 1 ms
5,376 KB |
testcase_04 | AC | 1 ms
5,376 KB |
testcase_05 | AC | 1 ms
5,376 KB |
testcase_06 | AC | 0 ms
5,376 KB |
testcase_07 | AC | 1 ms
5,376 KB |
testcase_08 | AC | 1 ms
5,376 KB |
testcase_09 | AC | 1 ms
5,376 KB |
testcase_10 | AC | 1 ms
5,376 KB |
testcase_11 | AC | 1 ms
5,376 KB |
testcase_12 | AC | 0 ms
5,376 KB |
testcase_13 | AC | 1 ms
5,376 KB |
コンパイルメッセージ
main.c:1:12: warning: return type defaults to 'int' [-Wimplicit-int] 1 | long n,i=2;main(){ | ^~~~ main.c: In function 'main': main.c:2:13: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 2 | for(scanf("%ld",&n);i++<n/2;) | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | long n,i=2;main(){ main.c:2:13: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 2 | for(scanf("%ld",&n);i++<n/2;) | ^~~~~ main.c:2:13: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:4:83: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 4 | if(__builtin_popcountll(i)>1&&__builtin_popcountll(n-i)>1)return !printf("%ld %ld",i,n-i); | ^~~~~~ main.c:4:83: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:4:83: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:4:83: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:6:9: warning: implicit declaration of function 'puts' [-Wimplicit-function-declaration] 6 | puts("-1"); | ^~~~ main.c:6:9: note: include '<stdio.h>' or provide a declaration of 'puts'
ソースコード
long n,i=2;main(){ for(scanf("%ld",&n);i++<n/2;) { if(__builtin_popcountll(i)>1&&__builtin_popcountll(n-i)>1)return !printf("%ld %ld",i,n-i); } puts("-1"); }