結果
問題 | No.504 ゲーム大会(ランキング) |
ユーザー |
![]() |
提出日時 | 2019-05-18 07:01:47 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 418 bytes |
コンパイル時間 | 85 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 34,656 KB |
最終ジャッジ日時 | 2024-09-17 06:05:56 |
合計ジャッジ時間 | 3,992 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 5 TLE * 1 -- * 7 |
ソースコード
def next_player(num):current = 0while True:yield currentcurrent+=1current%=numN = int(input())np = next_player(N)players = {i:0 for i in range(N)}plays = map(int,[input() for x in range(N)])for play in plays:current = next(np)players[current]+=playks_score = players[0]rank = sorted(list(players.values()),reverse=True).index(ks_score) + 1print(rank)