結果
問題 |
No.172 UFOを捕まえろ
|
ユーザー |
![]() |
提出日時 | 2018-03-05 01:24:26 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 391 bytes |
コンパイル時間 | 646 ms |
コンパイル使用メモリ | 70,140 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-18 03:35:45 |
合計ジャッジ時間 | 1,481 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
// No.172 UFOを捕まえろ // https://yukicoder.me/problems/no/172 // #include <iostream> #include <cmath> #include <algorithm> using namespace std; int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); int x, y, r; cin >> x >> y >> r; int ufo_center = abs(x) + abs(y); double ufo_r = sqrt(2) * r; cout << ufo_center + ceil(ufo_r) << endl; }