結果
問題 |
No.988 N×Mマス計算(総和)
|
ユーザー |
![]() |
提出日時 | 2020-04-21 09:57:53 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 270 ms / 2,000 ms |
コード長 | 251 bytes |
コンパイル時間 | 78 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 25,788 KB |
最終ジャッジ日時 | 2024-07-06 07:43:52 |
合計ジャッジ時間 | 2,712 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 19 |
ソースコード
n,m,k=map(int,input().split()) c=list(map(str,input().split())) a=[0]*(n) for i in range(n): a[i]=int(input()) op=c[0] b=[0]*m for i in range(m): b[i]=int(c[i+1]) if op=='+': print((sum(a)*m+sum(b)*n)%k) else: print(sum(a)*sum(b)%k)