結果
問題 | No.172 UFOを捕まえろ |
ユーザー | 西尾 |
提出日時 | 2018-03-13 17:59:40 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 345 bytes |
コンパイル時間 | 1,594 ms |
コンパイル使用メモリ | 165,772 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-22 11:14:25 |
合計ジャッジ時間 | 2,604 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include <bits/stdc++.h> using namespace std; int Root2( const int iR ) { int i; int iSq; iSq = 2 * iR * iR; i = (int) sqrt( (double) iSq ); if( i * i < iSq ) i++; if( i * i < iSq ) i++; return i; } int main() { int x; int y; int r; cin >> x; cin >> y; cin >> r; cout << abs( x ) + abs( y ) + Root2( r ) << endl; return 0; }