結果

問題 No.988 N×Mマス計算(総和)
ユーザー rythem00359
提出日時 2020-08-14 14:45:33
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 286 ms / 2,000 ms
コード長 194 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 22,452 KB
最終ジャッジ日時 2024-10-10 11:57:32
合計ジャッジ時間 3,438 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M,K=map(int,input().split())
B=input().split()
B2=map(int,B[1:])
A=[int(input()) for _ in range(N)]
if B[0]=='+':
    ans=((sum(A)*M)+(sum(B2)*N))%K
else:
    ans=(sum(A)*sum(B2))%K
print(ans)
0