結果

問題 No.3101 砂嵐
ユーザー simansiman
提出日時 2023-04-04 21:53:05
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 148 bytes
コンパイル時間 117 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 16,384 KB
最終ジャッジ日時 2024-04-08 20:59:41
合計ジャッジ時間 7,905 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
16,384 KB
testcase_01 AC 84 ms
16,256 KB
testcase_02 WA -
testcase_03 AC 81 ms
16,384 KB
testcase_04 AC 81 ms
16,384 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 82 ms
16,384 KB
testcase_08 WA -
testcase_09 AC 83 ms
16,384 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 83 ms
16,384 KB
testcase_13 AC 83 ms
16,384 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 83 ms
16,384 KB
testcase_18 AC 82 ms
16,384 KB
testcase_19 AC 84 ms
16,384 KB
testcase_20 AC 83 ms
16,384 KB
testcase_21 AC 83 ms
16,384 KB
testcase_22 AC 81 ms
16,384 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 82 ms
16,384 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 84 ms
16,384 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 AC 81 ms
16,384 KB
testcase_38 AC 81 ms
16,384 KB
testcase_39 WA -
testcase_40 WA -
testcase_41 AC 82 ms
16,384 KB
testcase_42 WA -
testcase_43 AC 80 ms
16,384 KB
testcase_44 WA -
testcase_45 AC 82 ms
16,384 KB
testcase_46 AC 82 ms
16,384 KB
testcase_47 WA -
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 WA -
testcase_52 AC 82 ms
16,384 KB
testcase_53 AC 82 ms
16,256 KB
testcase_54 WA -
testcase_55 WA -
testcase_56 WA -
testcase_57 WA -
testcase_58 WA -
testcase_59 WA -
testcase_60 WA -
testcase_61 WA -
testcase_62 WA -
testcase_63 WA -
testcase_64 AC 84 ms
16,384 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.to_i

def f(x)
  return 0 if x < 10

  v = 0
  0.upto(Math.log10(x)) do |i|
    v += x / (10.pow(i)) % 10
  end

  1 + f(v)
end

puts f(N)
0