結果
| 問題 |
No.98 円を描こう
|
| コンテスト | |
| ユーザー |
srup٩(๑`н´๑)۶
|
| 提出日時 | 2016-08-08 10:04:21 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 328 bytes |
| コンパイル時間 | 1,024 ms |
| コンパイル使用メモリ | 58,356 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-07 07:09:01 |
| 合計ジャッジ時間 | 1,164 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 4 WA * 2 |
ソースコード
#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
int main(void){
int x, y; cin >> x >> y;
double d = x * x + y * y;
int ans;
if(sqrt(d) == (int)sqrt(d)){
ans = 2 * sqrt(d) + 1;
}else{
ans = 2 * (int)(sqrt(d) + 1);
}
printf("%d\n", ans);
return 0;
}
srup٩(๑`н´๑)۶