結果
| 問題 |
No.98 円を描こう
|
| コンテスト | |
| ユーザー |
Elk
|
| 提出日時 | 2018-06-06 01:04:25 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 298 bytes |
| コンパイル時間 | 239 ms |
| コンパイル使用メモリ | 38,528 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-30 10:11:11 |
| 合計ジャッジ時間 | 851 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 6 |
ソースコード
#include <stdio.h>
#include <math.h>
int main(){
int Px, Py, add;
double r, sub;
scanf("%d %d", &Px, &Py);
r = sqrt(Px*Px + Py*Py);
sub = r - (int)r;
if(sub >= 0.5){
add = 2;
}else{
add = 1;
}
printf("%d\n", (int)r*2 + add);
return 0;
}
Elk