結果
問題 |
No.98 円を描こう
|
ユーザー |
![]() |
提出日時 | 2015-12-05 00:28:59 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 364 bytes |
コンパイル時間 | 1,558 ms |
コンパイル使用メモリ | 158,552 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-14 14:08:40 |
合計ジャッジ時間 | 2,009 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 4 |
other | WA * 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); cout << 2 * sqrt(x * x + y * y) << endl; if (ans == 2 * sqrt(x * x + y * y)) { cout << (int)++ans; } else { cout << (int)ceil(ans); cout << endl; } return 0; }