結果

問題 No.504 ゲーム大会(ランキング)
ユーザー swdamdrswdamdr
提出日時 2017-05-22 13:42:41
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 628 bytes
コンパイル時間 2,601 ms
コンパイル使用メモリ 107,896 KB
実行使用メモリ 30,932 KB
最終ジャッジ日時 2023-10-19 13:35:56
合計ジャッジ時間 2,796 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
23,840 KB
testcase_01 AC 26 ms
23,840 KB
testcase_02 AC 26 ms
23,852 KB
testcase_03 AC 25 ms
23,852 KB
testcase_04 AC 25 ms
23,852 KB
testcase_05 AC 25 ms
23,852 KB
testcase_06 AC 25 ms
23,768 KB
testcase_07 AC 84 ms
30,868 KB
testcase_08 AC 84 ms
30,808 KB
testcase_09 AC 84 ms
30,868 KB
testcase_10 AC 82 ms
30,472 KB
testcase_11 AC 83 ms
30,876 KB
testcase_12 AC 79 ms
30,932 KB
testcase_13 AC 73 ms
29,388 KB
testcase_14 AC 84 ms
30,868 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;
using System.Collections.Generic;

class Program
{
    static void Main(string[] args)
    {
        int N = int.Parse(Console.ReadLine());
        int K = int.Parse(Console.ReadLine());

        List<int> ranking = new List<int>();
        int rank = 1;
        ranking.Add(rank);

        for(int i = 0; i < N - 1; i++)
        {
            int a = int.Parse(Console.ReadLine());

            if(K < a)
            {
                rank++;
            }

            ranking.Add(rank);
        }

        Console.WriteLine(string.Join("\r\n", ranking));
        Console.ReadLine();
    }

}
0