結果

問題 No.990 N×Mマス計算(Kの倍数)
ユーザー _matumo__matumo_
提出日時 2020-03-12 19:08:56
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 302 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 95,104 KB
最終ジャッジ日時 2024-04-29 20:52:05
合計ジャッジ時間 6,745 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
57,344 KB
testcase_01 AC 40 ms
51,968 KB
testcase_02 AC 47 ms
57,856 KB
testcase_03 AC 42 ms
52,352 KB
testcase_04 AC 42 ms
52,096 KB
testcase_05 AC 43 ms
51,968 KB
testcase_06 AC 47 ms
57,856 KB
testcase_07 AC 46 ms
58,112 KB
testcase_08 AC 42 ms
51,712 KB
testcase_09 AC 42 ms
51,968 KB
testcase_10 TLE -
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M,K=map(int,input().split())
F,*pB=input().split()
pb=[int(s)%K for s in pB]
sm=0
if F=='+':
    pa=[(int(input())+K-1)%K+1 for _ in range(N)]
    for n in pa:
        sm += pb.count(K-n)
else:
    for _ in range(N):
        n=int(input())%K
        for m in pb:
            sm += n*m%K==0
print(sm)
0