結果

問題 No.796 well known
コンテスト
ユーザー c-yan
提出日時 2020-08-08 00:03:47
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
RE  
実行時間 -
コード長 235 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 300 ms
コンパイル使用メモリ 21,340 KB
実行使用メモリ 20,648 KB
最終ジャッジ日時 2026-09-03 16:11:52
合計ジャッジ時間 7,344 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 2
other RE * 15
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N = int(input())

PS = []
for _ in range(N):
    S, P = input().split()
    P = int(P)
    PS.append((P, S))

PS.sort(reverse=True)
total = sum(P for P, S in PS)
if PS[0][0] > total // 2:
    print(PS[0][1])
else:
    print('atcoder')
0