結果

問題 No.504 ゲーム大会(ランキング)
ユーザー vorg101vorg101
提出日時 2017-05-03 20:03:36
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 538 ms / 2,000 ms
コード長 889 bytes
コンパイル時間 2,138 ms
コンパイル使用メモリ 107,356 KB
実行使用メモリ 27,052 KB
最終ジャッジ日時 2023-10-12 08:02:26
合計ジャッジ時間 8,292 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
20,824 KB
testcase_01 AC 58 ms
20,740 KB
testcase_02 AC 56 ms
20,768 KB
testcase_03 AC 58 ms
20,728 KB
testcase_04 AC 57 ms
20,804 KB
testcase_05 AC 57 ms
20,732 KB
testcase_06 AC 57 ms
20,812 KB
testcase_07 AC 538 ms
27,052 KB
testcase_08 AC 524 ms
24,824 KB
testcase_09 AC 521 ms
26,932 KB
testcase_10 AC 520 ms
27,004 KB
testcase_11 AC 534 ms
24,920 KB
testcase_12 AC 516 ms
24,816 KB
testcase_13 AC 513 ms
24,916 KB
testcase_14 AC 524 ms
26,952 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class Program
{
    private static readonly Scanner sc = new Scanner();
    static void Main(string[] args)
    {
        int n = sc.Int;
        int score = sc.Int;
        int rank = 1;
        Console.WriteLine(1);
        for (int i = 0; i < n - 1; i++)
        {
            if (score < sc.Int)
                rank++;
            Console.WriteLine(rank);
        }
    }
}

class Scanner
{
    private string[] _str = new string[0];
    private int _i;

    public string Str
    {
        get
        {
            if (_i >= _str.Length)
            {
                _str = Console.ReadLine().Split(' ');
                _i = 0;
            }
            return _str[_i++];
        }
    }

    public int Int { get { return int.Parse(Str); } }
    public long Long { get { return long.Parse(Str); } }
    public double Double { get { return double.Parse(Str); } }
}
0