結果

問題 No.988 N×Mマス計算(総和)
ユーザー shika_126
提出日時 2022-04-09 01:03:42
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 293 ms / 2,000 ms
コード長 225 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 19,052 KB
最終ジャッジ日時 2024-11-28 16:37:25
合計ジャッジ時間 3,506 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,k = map(int,input().split())
p,*a = input().split()
a = sum(map(int,a))
s = 0
if p =='*':
    for i in range(n):
        s += int(input())*a
else:
    for i in range(n):
        s += int(input())*m
    s += a*n
print(s%k)
0