結果
問題 | No.414 衝動 |
ユーザー | tails |
提出日時 | 2021-02-22 18:50:04 |
言語 | C (gcc 12.3.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 268 bytes |
コンパイル時間 | 200 ms |
コンパイル使用メモリ | 28,928 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-15 09:44:31 |
合計ジャッジ時間 | 1,080 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 1 ms
6,820 KB |
testcase_02 | AC | 1 ms
6,816 KB |
testcase_03 | AC | 4 ms
6,816 KB |
testcase_04 | AC | 1 ms
6,820 KB |
testcase_05 | AC | 4 ms
6,820 KB |
testcase_06 | AC | 5 ms
6,820 KB |
testcase_07 | AC | 4 ms
6,816 KB |
testcase_08 | AC | 5 ms
6,820 KB |
testcase_09 | AC | 4 ms
6,816 KB |
testcase_10 | AC | 1 ms
6,820 KB |
testcase_11 | AC | 1 ms
6,816 KB |
testcase_12 | AC | 1 ms
6,816 KB |
コンパイルメッセージ
main.c:4:1: warning: return type defaults to 'int' [-Wimplicit-int] 4 | main(){ | ^~~~ main.c: In function 'main': main.c:6:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 6 | scanf("%ld",&m); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | #pragma GCC optimize("Ofast") main.c:6:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 6 | scanf("%ld",&m); | ^~~~~ main.c:6:9: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:8:17: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 8 | printf("2 %ld",m/2); | ^~~~~~ main.c:8:17: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:8:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:8:17: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:9:17: warning: implicit declaration of function 'exit' [-Wimplicit-function-declaration] 9 | exit(0); | ^~~~ main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit' +++ |+#include <stdlib.h> 1 | #pragma GCC optimize("Ofast") main.c:9:17: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 9 | exit(0); | ^~~~ main.c:9:17: note: include '<stdlib.h>' or provide a declaration of 'exit' main.c:13:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 13 | printf("%ld %ld",i,m/i); | ^~~~~~ main.c:13:25: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:14:25: warning: incompatible implicit decl
ソースコード
#pragma GCC optimize("Ofast") #pragma GCC target("avx2") main(){ long m; scanf("%ld",&m); if((m&1)==0){ printf("2 %ld",m/2); exit(0); } for(long i=-1,a=2;i+=a^=6,i<1000000;){ if(m%i==0){ printf("%ld %ld",i,m/i); exit(0); } } printf("1 %ld",m); }