結果
問題 | No.988 N×Mマス計算(総和) |
ユーザー |
|
提出日時 | 2020-02-24 09:46:09 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 217 ms / 2,000 ms |
コード長 | 248 bytes |
コンパイル時間 | 612 ms |
コンパイル使用メモリ | 7,196 KB |
実行使用メモリ | 21,780 KB |
最終ジャッジ日時 | 2024-07-06 07:29:53 |
合計ジャッジ時間 | 2,789 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 19 |
ソースコード
#yuki987 n,m,k=map(int,raw_input().split()) op=raw_input().split() b=[] for i in range(1,len(op)): b.append(int(op[i])) a=[] for i in range(n): a.append(int(raw_input())) if op[0]=='+': print (sum(a)*m+sum(b)*n)%k else: print (sum(a)*sum(b))%k