結果
問題 |
No.414 衝動
|
ユーザー |
![]() |
提出日時 | 2017-02-02 10:48:16 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 293 bytes |
コンパイル時間 | 207 ms |
コンパイル使用メモリ | 23,552 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 03:14:38 |
合計ジャッジ時間 | 2,643 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 8 WA * 5 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:9:30: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘int’ [-Wformat=] 9 | printf("2 %lld\n", 2, m / 2); | ~~~^ ~ | | | | | int | long long int | %d main.c:9:24: warning: too many arguments for format [-Wformat-extra-args] 9 | printf("2 %lld\n", 2, m / 2); | ^~~~~~~~~~ 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", 2, m / 2); } 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; }