結果

問題 No.504 ゲーム大会(ランキング)
ユーザー RK PythonRK Python
提出日時 2020-06-07 16:10:20
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 330 bytes
コンパイル時間 131 ms
コンパイル使用メモリ 10,736 KB
実行使用メモリ 19,824 KB
最終ジャッジ日時 2023-08-25 11:00:25
合計ジャッジ時間 1,901 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,776 KB
testcase_01 AC 14 ms
7,792 KB
testcase_02 AC 15 ms
7,936 KB
testcase_03 AC 15 ms
7,776 KB
testcase_04 AC 16 ms
7,912 KB
testcase_05 AC 15 ms
7,776 KB
testcase_06 AC 15 ms
7,868 KB
testcase_07 AC 71 ms
18,344 KB
testcase_08 AC 73 ms
17,640 KB
testcase_09 AC 73 ms
18,376 KB
testcase_10 AC 68 ms
16,628 KB
testcase_11 AC 70 ms
19,040 KB
testcase_12 AC 72 ms
19,824 KB
testcase_13 AC 67 ms
16,076 KB
testcase_14 AC 74 ms
18,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin
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
    print("\n".join(map(str, ans)))

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