結果
問題 |
No.414 衝動
|
ユーザー |
![]() |
提出日時 | 2025-03-28 16:50:37 |
言語 | C (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 344 bytes |
コンパイル時間 | 403 ms |
コンパイル使用メモリ | 24,960 KB |
実行使用メモリ | 14,784 KB |
最終ジャッジ日時 | 2025-03-28 16:50:42 |
合計ジャッジ時間 | 3,408 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 TLE * 1 -- * 7 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:10:24: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘long int’ [-Wformat=] 10 | printf("%lld %lld",i , n/i); | ~~~^ ~ | | | | | long int | long long int | %ld main.c:10:29: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘long int’ [-Wformat=] 10 | printf("%lld %lld",i , n/i); | ~~~^ ~~~ | | | | | long int | long long int | %ld main.c:6:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%ld",&n); | ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <stdbool.h> void main(void) { long int n = 0; scanf("%ld",&n); bool flg = false; for(long int i = 2 ; i < n/2 ; i++){ if(n%i == 0 && n/i > 1){ printf("%lld %lld",i , n/i); flg = true; break; } } if(!flg){ printf("1 %ld",n); } }