結果
| 問題 | No.112 ややこしい鶴亀算 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-10 03:48:08 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 18 ms / 5,000 ms |
| + 630µs | |
| コード長 | 521 bytes |
| 記録 | |
| コンパイル時間 | 2,072 ms |
| コンパイル使用メモリ | 107,520 KB |
| 実行使用メモリ | 20,096 KB |
| 最終ジャッジ日時 | 2026-09-14 09:19:02 |
| 合計ジャッジ時間 | 4,004 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
コンパイルメッセージ
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 Program {
static void Main() {
int n = int.Parse(Console.ReadLine());
var a = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList();
a.Sort();
int turu = 0;
int kame = 0;
if (a[0] == a[n - 1]) {
if (a[0] / (n - 1) == 2) turu = n;
else kame = n;
} else {
kame = a.IndexOf(a[n - 1]);
turu = n - kame;
}
Console.WriteLine(turu + " " + kame);
}
}