結果
| 問題 |
No.990 N×Mマス計算(Kの倍数)
|
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2021-05-06 06:18:07 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 318 bytes |
| コンパイル時間 | 200 ms |
| コンパイル使用メモリ | 82,152 KB |
| 実行使用メモリ | 107,524 KB |
| 最終ジャッジ日時 | 2024-09-13 23:35:33 |
| 合計ジャッジ時間 | 3,408 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 RE * 1 |
| other | AC * 9 RE * 10 |
ソースコード
from collections import Counter from math import gcd n,m,k,op,*ab = open(0).read().split() m,k = int(m),int(k) a = Counter(gcd(k,int(i)) for i in ab[:m]) b = Counter(gcd(k,int(i)) for i in ab[m:]) print(sum(db[-i%k] for i,v in a.items()) if op == "+" else sum(v*w*(i*j%k==0) for j,w in b.items() for i,v in a.items()))
convexineq