結果
問題 |
No.504 ゲーム大会(ランキング)
|
ユーザー |
![]() |
提出日時 | 2017-05-03 20:03:36 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 510 ms / 2,000 ms |
コード長 | 889 bytes |
コンパイル時間 | 3,787 ms |
コンパイル使用メモリ | 113,064 KB |
実行使用メモリ | 22,144 KB |
最終ジャッジ日時 | 2024-09-14 07:10:00 |
合計ジャッジ時間 | 9,475 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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.
ソースコード
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); } } }