結果

問題 No.933 おまわりさんこいつです
ユーザー wipexwipex
提出日時 2019-12-16 22:59:34
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 336 bytes
コンパイル時間 265 ms
コンパイル使用メモリ 11,468 KB
実行使用メモリ 132,520 KB
最終ジャッジ日時 2023-09-15 18:48:39
合計ジャッジ時間 8,288 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
19,420 KB
testcase_01 AC 78 ms
15,060 KB
testcase_02 AC 77 ms
15,120 KB
testcase_03 AC 79 ms
15,168 KB
testcase_04 AC 78 ms
15,236 KB
testcase_05 AC 79 ms
15,272 KB
testcase_06 AC 80 ms
15,264 KB
testcase_07 AC 79 ms
15,268 KB
testcase_08 AC 80 ms
15,420 KB
testcase_09 AC 78 ms
15,432 KB
testcase_10 AC 78 ms
15,376 KB
testcase_11 AC 81 ms
15,544 KB
testcase_12 AC 81 ms
15,464 KB
testcase_13 AC 97 ms
24,760 KB
testcase_14 AC 109 ms
32,752 KB
testcase_15 AC 186 ms
78,748 KB
testcase_16 AC 761 ms
112,084 KB
testcase_17 AC 132 ms
38,176 KB
testcase_18 AC 78 ms
15,060 KB
testcase_19 AC 313 ms
119,356 KB
testcase_20 AC 652 ms
132,520 KB
testcase_21 AC 79 ms
15,140 KB
testcase_22 AC 78 ms
15,144 KB
testcase_23 TLE -
testcase_24 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.chomp.to_i
p = gets.chomp.split(" ").map(&:to_i)
s = p.inject(:*)
f = 1

def moji(s)
  zzz = s.to_s
  sl = s.to_s.length
  return zzz, sl
end

zzz, sl = moji(s)

while(f)
  if sl > 1
    yyy = 0
    for i in 0...sl
      yyy +=zzz[i].to_i
    end
    zzz, sl= moji(yyy)
  else
    yyy = zzz[0]
    f = nil
  end
end
p yyy.to_i
0