結果

問題 No.90 品物の並び替え
ユーザー maatanbetamaatanbeta
提出日時 2017-04-26 11:52:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 388 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 10,560 KB
実行使用メモリ 7,984 KB
最終ジャッジ日時 2023-10-11 15:11:33
合計ジャッジ時間 950 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,800 KB
testcase_01 WA -
testcase_02 AC 15 ms
7,824 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
item1 = [0] * M
item2 = [0] * M
score = [0] * M
sei_score = 0
gyaku_score = 0
for i in range(M):
    item1[i], item2[i], score[i] = map(int, input().split())
    if item1[i] < item2[i]:
        sei_score += score[i]
    if item1[i] > item2[i]:
        gyaku_score += score[i]

if sei_score > gyaku_score:
    print(sei_score)
else:
    print(gyaku_score)
0