結果

問題 No.933 おまわりさんこいつです
ユーザー wipexwipex
提出日時 2019-12-17 11:57:56
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 238 bytes
コンパイル時間 232 ms
コンパイル使用メモリ 11,244 KB
実行使用メモリ 129,504 KB
最終ジャッジ日時 2023-09-15 19:28:05
合計ジャッジ時間 7,895 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
19,564 KB
testcase_01 AC 79 ms
14,972 KB
testcase_02 AC 78 ms
15,256 KB
testcase_03 AC 78 ms
15,096 KB
testcase_04 AC 78 ms
15,048 KB
testcase_05 AC 77 ms
15,028 KB
testcase_06 AC 78 ms
15,044 KB
testcase_07 AC 81 ms
15,156 KB
testcase_08 AC 78 ms
15,252 KB
testcase_09 AC 77 ms
15,212 KB
testcase_10 AC 77 ms
15,108 KB
testcase_11 AC 79 ms
15,068 KB
testcase_12 AC 80 ms
15,324 KB
testcase_13 AC 91 ms
24,036 KB
testcase_14 AC 102 ms
32,464 KB
testcase_15 AC 172 ms
78,460 KB
testcase_16 AC 687 ms
112,432 KB
testcase_17 AC 129 ms
38,184 KB
testcase_18 AC 78 ms
15,184 KB
testcase_19 AC 309 ms
119,088 KB
testcase_20 AC 620 ms
129,504 KB
testcase_21 AC 78 ms
14,984 KB
testcase_22 AC 78 ms
15,140 KB
testcase_23 TLE -
testcase_24 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.chomp.to_i
p = gets.chomp.split(" ").map(&:to_i)
#s = p.inject(:*)                                                               
s = 1
p.each do |i|
  s*=i
  break if s==0
end

if s==0
  p 0
elsif s%9 ==0
  p 9
else
  p s%9
end
0