結果
問題 |
No.98 円を描こう
|
ユーザー |
![]() |
提出日時 | 2015-12-05 00:30:36 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 330 bytes |
コンパイル時間 | 1,448 ms |
コンパイル使用メモリ | 158,292 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-14 14:08:44 |
合計ジャッジ時間 | 1,724 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 |
ソースコード
//yukicoder 98 "円を描こう" //http://yukicoder.me/problems/224 #include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; double ans = 2 * sqrt(x * x + y * y); if (ans == 2 * sqrt(x * x + y * y)) { cout << (int)++ans << endl; } else { cout << (int)ceil(ans); cout << endl; } return 0; }