結果
問題 | No.467 隠されていたゲーム |
ユーザー |
|
提出日時 | 2016-12-17 00:37:16 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 78 ms / 2,000 ms |
コード長 | 193 bytes |
コンパイル時間 | 180 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-10-04 16:13:20 |
合計ジャッジ時間 | 3,006 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n Syntax OK
ソースコード
n = gets.to_i d = gets.split.map &:to_i x, y = gets.split.map &:to_i z = [x.abs, y.abs].max dmax = d.max res = (z + dmax - 1) / dmax if res == 1 && ! d.include?(z) puts 2 else puts res end