結果

問題 No.1336 Union on Blackboard
ユーザー tamura2004tamura2004
提出日時 2021-01-21 08:03:45
言語 Crystal
(1.11.2)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 211 bytes
コンパイル時間 17,490 ms
コンパイル使用メモリ 254,724 KB
実行使用メモリ 4,984 KB
最終ジャッジ日時 2023-09-13 13:09:00
合計ジャッジ時間 18,429 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,408 KB
testcase_01 AC 3 ms
4,716 KB
testcase_02 AC 4 ms
4,848 KB
testcase_03 AC 3 ms
4,808 KB
testcase_04 AC 3 ms
4,692 KB
testcase_05 AC 3 ms
4,712 KB
testcase_06 AC 3 ms
4,860 KB
testcase_07 AC 3 ms
4,800 KB
testcase_08 AC 3 ms
4,760 KB
testcase_09 AC 4 ms
4,796 KB
testcase_10 AC 4 ms
4,736 KB
testcase_11 AC 4 ms
4,808 KB
testcase_12 AC 4 ms
4,768 KB
testcase_13 AC 4 ms
4,884 KB
testcase_14 AC 4 ms
4,896 KB
testcase_15 AC 4 ms
4,928 KB
testcase_16 AC 4 ms
4,876 KB
testcase_17 AC 4 ms
4,832 KB
testcase_18 AC 4 ms
4,944 KB
testcase_19 AC 3 ms
4,820 KB
testcase_20 AC 4 ms
4,944 KB
testcase_21 AC 4 ms
4,868 KB
testcase_22 AC 3 ms
4,784 KB
testcase_23 AC 4 ms
4,900 KB
testcase_24 AC 4 ms
4,840 KB
testcase_25 AC 4 ms
4,868 KB
testcase_26 AC 4 ms
4,984 KB
testcase_27 AC 4 ms
4,956 KB
testcase_28 AC 4 ms
4,856 KB
testcase_29 AC 4 ms
4,808 KB
testcase_30 AC 3 ms
4,492 KB
testcase_31 AC 2 ms
4,564 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 10_i64 ** 9 + 7
t = gets.to_s.to_i
t.times do
  n = gets.to_s.to_i
  a = gets.to_s.split.map { |v| v.to_i64 }
  ans = 1_i64
  a.each do |v|
    ans *= v + 1
    ans %= MOD
  end
  puts (ans - 1) % MOD
end
0