結果
問題 | No.131 マンハッタン距離 |
ユーザー |
![]() |
提出日時 | 2016-01-13 21:33:45 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 87 ms / 5,000 ms |
コード長 | 144 bytes |
コンパイル時間 | 58 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-09-19 18:57:22 |
合計ジャッジ時間 | 3,119 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
コンパイルメッセージ
Main.rb:2: warning: assigned but unused variable - m Syntax OK
ソースコード
x, y, d = gets.split.map(&:to_i)m = x + yres = d + 1res -= d - x if x < dres -= d - y if y < dif res >= 0puts reselseputs 0end