結果
| 問題 | No.98 円を描こう |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2014-12-23 17:14:56 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 0 ms / 5,000 ms |
| + 739µs | |
| コード長 | 231 bytes |
| 記録 | |
| コンパイル時間 | 68 ms |
| コンパイル使用メモリ | 29,440 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-23 20:44:39 |
| 合計ジャッジ時間 | 1,165 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 6 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:9:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%d %d",&x,&y);
| ^~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include<math.h>
int main()
{
int x,y,i;
double d;
scanf("%d %d",&x,&y);
d=sqrt(x*x+y*y);
for (i=1;;i++) {
if (d<i/2.0 && i/2.0<=d+1) {
break;
}
}
printf("%d\n",i);
return 0;
}