結果
問題 | No.988 N×Mマス計算(総和) |
ユーザー | stng |
提出日時 | 2022-08-17 10:54:57 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 425 bytes |
コンパイル時間 | 134 ms |
コンパイル使用メモリ | 82,360 KB |
実行使用メモリ | 95,424 KB |
最終ジャッジ日時 | 2024-04-15 02:18:35 |
合計ジャッジ時間 | 2,578 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 36 ms
51,840 KB |
testcase_02 | AC | 37 ms
52,096 KB |
testcase_03 | AC | 34 ms
52,096 KB |
testcase_04 | WA | - |
testcase_05 | AC | 35 ms
52,480 KB |
testcase_06 | AC | 35 ms
52,096 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | AC | 86 ms
78,976 KB |
testcase_11 | AC | 84 ms
93,092 KB |
testcase_12 | AC | 109 ms
94,976 KB |
testcase_13 | WA | - |
testcase_14 | AC | 78 ms
85,632 KB |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | AC | 82 ms
90,752 KB |
testcase_19 | WA | - |
testcase_20 | WA | - |
ソースコード
n,m,k = map(int,input().split()) opb = input().split() op = opb[0] b = [] for i in range(1,m+1): b.append(int(opb[i])) a = [int(input()) for i in range(n)] ans = 0 smb = sum(b) sma = sum(a) for i in range(n): if op == "+": ans += a[i]*m else: ans += a[i]*smb ans %= k for i in range(m): if op == "+": ans += b[i]*n #else: # ans += b[i]*sma #ans %= k print(ans)