結果

問題 No.504 ゲーム大会(ランキング)
ユーザー RK Python
提出日時 2020-06-07 16:09:42
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 167 ms / 2,000 ms
コード長 350 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 20,736 KB
最終ジャッジ日時 2024-12-23 17:37:22
合計ジャッジ時間 2,523 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin, stdout
input = stdin.readline

def main():
    N = int(input())
    ans = [0]*(N)
    rank = 1
    score = int(input())
    for i in range(N-1):
        ans[i] = rank
        if int(input()) > score:
            rank += 1
    ans[-1] = rank
    stdout.writelines("\n".join(map(str, ans)))

if __name__ == "__main__":
    main()
0