結果

問題 No.988 N×Mマス計算(総和)
ユーザー oshii
提出日時 2020-03-07 14:01:16
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 259 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 21,660 KB
最終ジャッジ日時 2024-07-06 07:33:09
合計ジャッジ時間 3,947 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 4 WA * 4 TLE * 1 -- * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m, k = map(int, input().split())
bw = list(map(str, input().split()))
a = [int(input()) for i in range(n)]
op = bw.pop(0)
b = [int(i) for i in bw]

c = 0
for i in a:
	for j in b:
		if op == "*":
			c += i*j
			c %= 10**9+7
		else:
			c += i+j
print (c%k)

0