結果

問題 No.172 UFOを捕まえろ
ユーザー mmmpppmmmppp
提出日時 2017-02-26 16:23:11
言語 Ruby
(3.2.2)
結果
AC  
実行時間 81 ms / 5,000 ms
コード長 121 bytes
コンパイル時間 53 ms
コンパイル使用メモリ 11,516 KB
実行使用メモリ 15,700 KB
最終ジャッジ日時 2023-09-02 10:00:40
合計ジャッジ時間 3,369 ms
ジャッジサーバーID
(参考情報)
judge15 / judge16
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,444 KB
testcase_01 AC 80 ms
15,632 KB
testcase_02 AC 81 ms
15,384 KB
testcase_03 AC 79 ms
15,600 KB
testcase_04 AC 80 ms
15,520 KB
testcase_05 AC 80 ms
15,696 KB
testcase_06 AC 79 ms
15,384 KB
testcase_07 AC 79 ms
15,424 KB
testcase_08 AC 79 ms
15,388 KB
testcase_09 AC 79 ms
15,420 KB
testcase_10 AC 78 ms
15,700 KB
testcase_11 AC 79 ms
15,436 KB
testcase_12 AC 79 ms
15,624 KB
testcase_13 AC 80 ms
15,440 KB
testcase_14 AC 80 ms
15,444 KB
testcase_15 AC 81 ms
15,672 KB
testcase_16 AC 80 ms
15,700 KB
testcase_17 AC 78 ms
15,512 KB
testcase_18 AC 78 ms
15,684 KB
testcase_19 AC 78 ms
15,632 KB
testcase_20 AC 78 ms
15,672 KB
testcase_21 AC 78 ms
15,380 KB
testcase_22 AC 79 ms
15,648 KB
testcase_23 AC 79 ms
15,388 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

x,y,r=gets.split.map &:to_i
t=r/2**0.5
m=[[x+t,y+t],[x+t,y-t],[x-t,y+t],[x-t,y-t]].map{|a|a[0].abs+a[1].abs}.max
p m.ceil
0