結果
| 問題 |
No.564 背の順
|
| コンテスト | |
| ユーザー |
pirorirori_n712
|
| 提出日時 | 2018-05-30 00:58:37 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 468 bytes |
| コンパイル時間 | 850 ms |
| コンパイル使用メモリ | 112,812 KB |
| 実行使用メモリ | 27,292 KB |
| 最終ジャッジ日時 | 2024-06-30 08:08:52 |
| 合計ジャッジ時間 | 1,746 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 9 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Linq;
class No564{
static void Main(string[] args){
string[] str=(Console.ReadLine()).Split(' ');
int[] i=str.Select(s=>Int32.Parse(s)).ToArray();
var num=i[1]-1;
var count=0;
for(int j=0;j<num;++j){
if((i[0]-(Int32.Parse(Console.ReadLine())))<0) count++;
}
var s=(count>3)?"th":(count==3)?"rd":(count==2)?"nd":"st";
Console.WriteLine($"{count+1}+s");
}
}
pirorirori_n712