結果

問題 No.504 ゲーム大会(ランキング)
ユーザー velfare_nagata
提出日時 2017-04-28 18:05:42
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 525 ms / 2,000 ms
コード長 613 bytes
コンパイル時間 1,886 ms
コンパイル使用メモリ 111,376 KB
実行使用メモリ 29,792 KB
最終ジャッジ日時 2024-09-13 17:53:35
合計ジャッジ時間 6,969 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace YukiCoder_No504
{
	public class Program
	{
		public static void Main()
		{
			var linePlayerCount = Console.ReadLine();
			if( linePlayerCount == null )
				return;
			var playerCount = int.Parse( linePlayerCount );

			var kScore = -1;
			var kRank = 1;
			for( var i = 0; i < playerCount; i++ )
			{
				var lineScore = Console.ReadLine();
				if( lineScore == null )
					return;
				if( i == 0 )
				{
					kScore = int.Parse( lineScore );
				}
				else
				{
					if( kScore < int.Parse( lineScore ) )
					{
						kRank++;
					}
				}
				Console.WriteLine( kRank );
			}
		}
	}
}
0