結果
問題 | No.988 N×Mマス計算(総和) |
ユーザー | toshiro_yanagi |
提出日時 | 2020-07-18 19:02:07 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 333 bytes |
コンパイル時間 | 289 ms |
コンパイル使用メモリ | 87,172 KB |
実行使用メモリ | 83,060 KB |
最終ジャッジ日時 | 2023-09-20 12:43:33 |
合計ジャッジ時間 | 5,101 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 72 ms
71,344 KB |
testcase_01 | AC | 75 ms
71,424 KB |
testcase_02 | AC | 78 ms
76,180 KB |
testcase_03 | AC | 77 ms
76,060 KB |
testcase_04 | AC | 76 ms
71,348 KB |
testcase_05 | AC | 78 ms
75,840 KB |
testcase_06 | AC | 78 ms
75,884 KB |
testcase_07 | AC | 76 ms
76,128 KB |
testcase_08 | AC | 78 ms
76,100 KB |
testcase_09 | AC | 76 ms
71,452 KB |
testcase_10 | TLE | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
ソースコード
n, m, k = map(int, input().split()) tmp = list(input().split()) tmp.reverse() op = tmp.pop() B = [int(tmp.pop()) for i in range(m)] A = [int(input()) for i in range(n)] ans = 0 for a in A: for b in B: if op == "+": ans += a + b elif op == "*": ans += a * b ans %= k print(ans)