結果

問題 No.988 N×Mマス計算(総和)
ユーザー convexineqconvexineq
提出日時 2020-02-14 21:25:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 87 ms / 2,000 ms
コード長 359 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 10,592 KB
実行使用メモリ 30,336 KB
最終ジャッジ日時 2023-09-20 11:26:17
合計ジャッジ時間 1,913 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,796 KB
testcase_01 AC 15 ms
7,836 KB
testcase_02 AC 15 ms
7,800 KB
testcase_03 AC 15 ms
7,800 KB
testcase_04 AC 15 ms
7,848 KB
testcase_05 AC 16 ms
7,800 KB
testcase_06 AC 16 ms
7,876 KB
testcase_07 AC 16 ms
7,816 KB
testcase_08 AC 16 ms
7,824 KB
testcase_09 AC 15 ms
7,884 KB
testcase_10 AC 36 ms
14,876 KB
testcase_11 AC 51 ms
18,936 KB
testcase_12 AC 68 ms
25,668 KB
testcase_13 AC 40 ms
16,212 KB
testcase_14 AC 38 ms
15,580 KB
testcase_15 AC 35 ms
14,548 KB
testcase_16 AC 59 ms
22,408 KB
testcase_17 AC 70 ms
25,256 KB
testcase_18 AC 47 ms
18,232 KB
testcase_19 AC 65 ms
24,436 KB
testcase_20 AC 87 ms
30,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!

import sys
readline = sys.stdin.readline
read = sys.stdin.read

n,m,k = [int(i) for i in readline().split()]

x = readline().split()
op = x[0]

b = [int(i) for i in x[1:]]
a = [int(i) for i in read().split()]


#print(op,b,a)
if op == "+":
    print((sum(b)*len(a)+len(b)*sum(a))%k)



else:
    print(sum(b)*sum(a)%k)





0