結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
17,536 KB
testcase_01 AC 83 ms
111,872 KB
testcase_02 AC 79 ms
17,536 KB
testcase_03 AC 83 ms
121,088 KB
testcase_04 AC 82 ms
17,536 KB
testcase_05 AC 81 ms
156,416 KB
testcase_06 AC 83 ms
17,536 KB
testcase_07 AC 82 ms
103,064 KB
testcase_08 AC 84 ms
17,664 KB
testcase_09 AC 84 ms
12,288 KB
testcase_10 AC 87 ms
12,288 KB
testcase_11 AC 92 ms
12,288 KB
testcase_12 AC 99 ms
14,464 KB
testcase_13 AC 408 ms
29,696 KB
testcase_14 AC 744 ms
35,072 KB
testcase_15 TLE -
testcase_16 TLE -
testcase_17 AC 238 ms
45,824 KB
testcase_18 AC 82 ms
12,160 KB
testcase_19 AC 1,434 ms
112,128 KB
testcase_20 TLE -
testcase_21 AC 82 ms
12,032 KB
testcase_22 AC 82 ms
12,160 KB
testcase_23 TLE -
testcase_24 TLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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