結果
問題 | No.414 衝動 |
ユーザー | くれちー |
提出日時 | 2016-08-26 23:15:21 |
言語 | C90 (gcc 11.4.0) |
結果 |
CE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 292 bytes |
コンパイル時間 | 334 ms |
コンパイル使用メモリ | 23,296 KB |
最終ジャッジ日時 | 2024-04-27 08:21:07 |
合計ジャッジ時間 | 676 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
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); | ^~~~~~~~~~~~~~~~~ /usr/bin/ld: /tmp/cc3hXq0i.o: in function `main': main.c:(.text.startup+0xd3): undefined reference to `sqrt' collect2: error: ld returned 1 exit status
ソースコード
#include <stdio.h> #include <math.h> int main() { long long int m, x = 0, y = 0, i; scanf("%lld", &m); for (i = 2; i <= sqrt(m); i++) { if (m % i == 0) { x = i; y = m / x; break; } } if (x == 0 || y == 0) { x = 1; y = m; } printf("%lld %lld\n", x, y); return 0; }