結果
| 問題 | No.98 円を描こう |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-05-12 17:36:49 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 232 bytes |
| 記録 | |
| コンパイル時間 | 485 ms |
| コンパイル使用メモリ | 59,996 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-06 00:17:20 |
| 合計ジャッジ時間 | 985 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 4 WA * 2 |
ソースコード
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
int x,y;
cin>>x>>y;
double p = sqrt(pow(x,2) + pow(y,2));
if (p== ceil(p))
{
cout<<ceil(p)*2+1<<endl;
}else{
cout<<ceil(p)*2<<endl;
}
return 0;
}