結果
問題 |
No.990 N×Mマス計算(Kの倍数)
|
ユーザー |
![]() |
提出日時 | 2020-04-21 10:27:30 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 366 bytes |
コンパイル時間 | 228 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 59,500 KB |
最終ジャッジ日時 | 2024-10-07 17:11:03 |
合計ジャッジ時間 | 14,424 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 2 |
other | RE * 19 |
ソースコード
N, M, K = map(int, input().split()) op, *B = input().split() A = [int(input())%K for _ in range(N)] b = list(map(int, B)) import numpy as np B = [0]*M for i in range(m): B[i]=b[i]%K if op=='+': cnt=0 for i in range(n): cnt+=max(0,B.count(K-A[i])) else: cnt=(N-(max(0,A.count(0))))*(M-(max(0,B.count(0)))) cnt=N*M-cnt print(cnt)