結果

問題 No.933 おまわりさんこいつです
ユーザー kzyKTkzyKT
提出日時 2019-11-29 22:09:47
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 208 bytes
コンパイル時間 44 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 35,200 KB
最終ジャッジ日時 2024-05-01 00:29:44
合計ジャッジ時間 6,325 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
19,488 KB
testcase_01 AC 90 ms
12,160 KB
testcase_02 AC 89 ms
12,160 KB
testcase_03 AC 90 ms
12,416 KB
testcase_04 AC 92 ms
12,160 KB
testcase_05 AC 89 ms
12,416 KB
testcase_06 AC 89 ms
12,416 KB
testcase_07 AC 90 ms
12,160 KB
testcase_08 AC 90 ms
12,416 KB
testcase_09 AC 89 ms
12,160 KB
testcase_10 AC 91 ms
12,160 KB
testcase_11 AC 98 ms
12,544 KB
testcase_12 AC 111 ms
14,592 KB
testcase_13 AC 433 ms
29,568 KB
testcase_14 AC 788 ms
35,200 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

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