結果

問題 No.333 門松列を数え上げ
ユーザー wonda_t_coffeewonda_t_coffee
提出日時 2020-02-03 09:09:36
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 90 bytes
コンパイル時間 43 ms
コンパイル使用メモリ 11,948 KB
実行使用メモリ 16,140 KB
最終ジャッジ日時 2023-10-19 01:41:19
合計ジャッジ時間 1,475 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

a,b=gets.chomp.split.map &:to_i
puts a>b ? [2e9-a,0].max+[a-b-1,0].max : a-1+[b-a-1,0].max
0