結果
問題 | No.98 円を描こう |
ユーザー | suppy193 |
提出日時 | 2015-06-01 10:16:36 |
言語 | C90 (gcc 11.4.0) |
結果 |
CE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 203 bytes |
コンパイル時間 | 128 ms |
コンパイル使用メモリ | 23,552 KB |
最終ジャッジ日時 | 2024-04-27 04:55:37 |
合計ジャッジ時間 | 492 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、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("%d%d", &x, &y); | ^~~~~~~~~~~~~~~~~~~~~ /usr/bin/ld: /tmp/ccdkL1Yf.o: in function `main': main.c:(.text.startup+0xad): undefined reference to `sqrt' collect2: error: ld returned 1 exit status
ソースコード
#include <stdio.h> #include <math.h> int main(void) { int x, y, d; double r; scanf("%d%d", &x, &y); r = sqrt(x * x + y * y); d = 2 * r + ((r - (int)r >= 0)? 1: 0); printf("%d\n", d); return 0; }