結果

問題 No.988 N×Mマス計算(総和)
ユーザー oshii
提出日時 2020-03-07 14:03:40
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 259 bytes
コンパイル時間 107 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,792 KB
最終ジャッジ日時 2024-07-06 07:32:59
合計ジャッジ時間 4,155 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 8 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 %= k
		else:
			c += i+j
			c %= k
print (c)
0