結果

問題 No.504 ゲーム大会(ランキング)
ユーザー RK PythonRK Python
提出日時 2020-06-07 16:09:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 350 bytes
コンパイル時間 115 ms
コンパイル使用メモリ 10,536 KB
実行使用メモリ 19,704 KB
最終ジャッジ日時 2023-08-25 11:00:15
合計ジャッジ時間 2,189 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,872 KB
testcase_01 AC 14 ms
7,964 KB
testcase_02 AC 15 ms
7,840 KB
testcase_03 AC 15 ms
7,756 KB
testcase_04 AC 14 ms
7,900 KB
testcase_05 AC 14 ms
7,776 KB
testcase_06 AC 15 ms
7,876 KB
testcase_07 AC 120 ms
18,220 KB
testcase_08 AC 117 ms
17,584 KB
testcase_09 AC 115 ms
18,300 KB
testcase_10 AC 107 ms
16,660 KB
testcase_11 AC 122 ms
19,240 KB
testcase_12 AC 118 ms
19,704 KB
testcase_13 AC 80 ms
16,008 KB
testcase_14 AC 118 ms
18,340 KB
権限があれば一括ダウンロードができます

ソースコード

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