結果

問題 No.90 品物の並び替え
ユーザー maatanbeta
提出日時 2017-04-26 11:52:57
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 388 bytes
コンパイル時間 339 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-09-13 14:01:21
合計ジャッジ時間 1,378 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 1 WA * 8
権限があれば一括ダウンロードができます

ソースコード

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