結果

問題 No.98 円を描こう
ユーザー wonda_t_coffeewonda_t_coffee
提出日時 2020-01-31 10:18:16
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 123 bytes
コンパイル時間 382 ms
コンパイル使用メモリ 11,908 KB
実行使用メモリ 16,116 KB
最終ジャッジ日時 2023-10-17 08:13:49
合計ジャッジ時間 2,088 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 78 ms
16,092 KB
testcase_03 WA -
testcase_04 AC 79 ms
16,092 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 79 ms
16,092 KB
testcase_08 AC 78 ms
16,092 KB
testcase_09 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

x, y = gets.chomp.split.map(&:to_f)
d = Math.sqrt(x * x + y * y)
if d == d.to_i
  puts d * 2 + 1
else
  puts d.ceil * 2
end
0