結果
問題 |
No.414 衝動
|
ユーザー |
![]() |
提出日時 | 2025-03-28 16:59:53 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 21 ms / 1,000 ms |
コード長 | 403 bytes |
コンパイル時間 | 286 ms |
コンパイル使用メモリ | 27,136 KB |
実行使用メモリ | 7,324 KB |
最終ジャッジ日時 | 2025-03-28 16:59:55 |
合計ジャッジ時間 | 1,542 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:7:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%lld",&n); | ^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <stdbool.h> #include <math.h> void main(void) { long long int n = 0; scanf("%lld",&n); bool flg = false; double plus = sqrt(n); for(long long int i = 2 ; i <= plus ; i++){ if(n%i == 0 && n/i > 1){ printf("%lld %lld",i , n/i); flg = true; break; } } if(!flg){ printf("1 %lld",n); } }