結果

問題 No.933 おまわりさんこいつです
ユーザー TSF_initialDTSF_initialD
提出日時 2020-03-30 11:55:41
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 155 bytes
コンパイル時間 407 ms
コンパイル使用メモリ 11,248 KB
実行使用メモリ 129,532 KB
最終ジャッジ日時 2023-09-02 11:35:35
合計ジャッジ時間 8,852 ms
ジャッジサーバーID
(参考情報)
judge13 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
19,720 KB
testcase_01 AC 82 ms
15,164 KB
testcase_02 AC 81 ms
15,328 KB
testcase_03 AC 82 ms
15,152 KB
testcase_04 AC 80 ms
15,248 KB
testcase_05 AC 83 ms
15,312 KB
testcase_06 AC 83 ms
15,120 KB
testcase_07 AC 83 ms
15,156 KB
testcase_08 AC 84 ms
15,336 KB
testcase_09 AC 83 ms
15,308 KB
testcase_10 AC 83 ms
15,044 KB
testcase_11 AC 83 ms
15,096 KB
testcase_12 AC 85 ms
15,508 KB
testcase_13 AC 95 ms
24,120 KB
testcase_14 AC 108 ms
32,628 KB
testcase_15 AC 172 ms
78,400 KB
testcase_16 AC 691 ms
112,356 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 617 ms
129,532 KB
testcase_21 AC 83 ms
15,308 KB
testcase_22 AC 82 ms
15,128 KB
testcase_23 TLE -
testcase_24 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n = $stdin.gets.to_i
arr =gets.chomp.split(" ").map(&:to_i);
ans = 1
arr.each do |k|
    ans = ans * k
end

ans % 9 == 0 ? ans = 9 : ans = ans % 9
puts ans
0