結果

問題 No.933 おまわりさんこいつです
ユーザー kzyKTkzyKT
提出日時 2019-11-29 22:07:15
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 203 bytes
コンパイル時間 43 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 107,036 KB
最終ジャッジ日時 2024-04-30 23:39:17
合計ジャッジ時間 6,325 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
19,104 KB
testcase_01 AC 92 ms
12,032 KB
testcase_02 AC 91 ms
12,160 KB
testcase_03 AC 91 ms
12,288 KB
testcase_04 AC 90 ms
12,160 KB
testcase_05 AC 91 ms
12,160 KB
testcase_06 AC 90 ms
12,160 KB
testcase_07 AC 90 ms
12,160 KB
testcase_08 AC 91 ms
12,160 KB
testcase_09 AC 93 ms
12,288 KB
testcase_10 AC 93 ms
12,288 KB
testcase_11 AC 99 ms
12,416 KB
testcase_12 AC 112 ms
14,720 KB
testcase_13 AC 437 ms
29,696 KB
testcase_14 AC 781 ms
35,328 KB
testcase_15 TLE -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

x = 1
n = gets.to_i
a = gets.chomp.split(" ")
for i in 0..n-1
  x *= a[i].to_i
  while x>=10 and x%10==0
    x/=10
  end
end

while x>=10
  y = 0
  while x>0
    y+=x%10
    x/=10
  end
  x=y
end
print x
0