結果
問題 |
No.98 円を描こう
|
ユーザー |
![]() |
提出日時 | 2016-07-22 20:23:29 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 323 bytes |
コンパイル時間 | 486 ms |
コンパイル使用メモリ | 59,532 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-06 08:46:06 |
合計ジャッジ時間 | 1,096 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 1 WA * 5 |
ソースコード
#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 * (sqrt(d) + 1); } printf("%d\n", ans); return 0; }