結果
問題 |
No.98 円を描こう
|
ユーザー |
![]() |
提出日時 | 2020-06-08 09:32:31 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 289 bytes |
コンパイル時間 | 2,517 ms |
コンパイル使用メモリ | 166,264 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-24 14:46:53 |
合計ジャッジ時間 | 3,425 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 4 WA * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { long long Xp, Yp; cin >> Xp >> Yp; long long sq = Xp * Xp + Yp * Yp; long long ans = sqrt( (double)sq ); for( ; ans * ans < sq; ans++ ) ; if( ans * ans == sq ) ans = ans * 2 + 1; else ans *= 2; cout << ans << endl; }