結果

問題 No.1184 Hà Nội
ユーザー shi-moshi-mo
提出日時 2020-09-29 03:34:19
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 120 bytes
コンパイル時間 541 ms
コンパイル使用メモリ 11,412 KB
実行使用メモリ 18,260 KB
最終ジャッジ日時 2023-09-16 03:57:03
合計ジャッジ時間 5,646 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,124 KB
testcase_01 AC 81 ms
15,256 KB
testcase_02 AC 82 ms
15,116 KB
testcase_03 AC 80 ms
15,316 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 AC 83 ms
15,084 KB
testcase_07 AC 85 ms
15,072 KB
testcase_08 RE -
testcase_09 AC 84 ms
15,040 KB
testcase_10 AC 84 ms
15,316 KB
testcase_11 RE -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 84 ms
15,256 KB
testcase_15 AC 84 ms
15,004 KB
testcase_16 AC 85 ms
15,156 KB
testcase_17 AC 85 ms
15,268 KB
testcase_18 AC 85 ms
15,288 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n, l = gets.split.map(&:to_i)
D = 998244353

def hanoi(n)
  return 1 if n <= 1
  hanoi(n-1)*2 + 1
end

puts hanoi(n-l+1)
0