結果
問題 |
No.414 衝動
|
ユーザー |
![]() |
提出日時 | 2017-02-02 10:49:47 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 302 bytes |
コンパイル時間 | 360 ms |
コンパイル使用メモリ | 23,168 KB |
実行使用メモリ | 6,816 KB |
最終ジャッジ日時 | 2024-12-24 02:30:48 |
合計ジャッジ時間 | 1,549 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 WA * 2 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%lld", &m); | ^~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <math.h> int main(void) { long long int m, i; scanf("%lld", &m); if(m % 2 == 0){ printf("2 %lld\n", m / 2); return 0; } for(i = 3;i < sqrt(m);i += 2){ if(m % i == 0){ printf("%lld %lld\n", i, m / i); return 0; } } printf("1 %lld\n", m); return 0; }