結果

問題 No.504 ゲーム大会(ランキング)
ユーザー boya978boya978
提出日時 2020-05-01 03:40:39
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 489 ms / 2,000 ms
コード長 456 bytes
コンパイル時間 2,293 ms
コンパイル使用メモリ 101,220 KB
実行使用メモリ 26,820 KB
最終ジャッジ日時 2023-08-23 12:40:00
合計ジャッジ時間 8,203 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
20,556 KB
testcase_01 AC 56 ms
20,612 KB
testcase_02 AC 56 ms
22,656 KB
testcase_03 AC 57 ms
20,668 KB
testcase_04 AC 56 ms
20,628 KB
testcase_05 AC 57 ms
20,684 KB
testcase_06 AC 56 ms
20,680 KB
testcase_07 AC 480 ms
24,700 KB
testcase_08 AC 476 ms
26,820 KB
testcase_09 AC 471 ms
24,912 KB
testcase_10 AC 473 ms
26,756 KB
testcase_11 AC 489 ms
24,712 KB
testcase_12 AC 467 ms
22,740 KB
testcase_13 AC 468 ms
24,788 KB
testcase_14 AC 468 ms
26,708 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;
public class Hello{
    public static void Main(){
        
        int n= int.Parse(Console.ReadLine());
        int k = 0;
        int rank = 1;
        for(int i=0;i<n;i++){
            
            int p = int.Parse(Console.ReadLine());
            
            if(i==0)
                k = p;
            
            if(p>k)
                rank++;

            Console.WriteLine(rank);    
        }
        
    }
}
0