結果
| 問題 |
No.582 キャンディー・ボックス3
|
| コンテスト | |
| ユーザー |
No
|
| 提出日時 | 2018-01-24 23:56:10 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 556 bytes |
| コンパイル時間 | 3,747 ms |
| コンパイル使用メモリ | 105,984 KB |
| 実行使用メモリ | 19,712 KB |
| 最終ジャッジ日時 | 2024-12-26 08:26:01 |
| 合計ジャッジ時間 | 5,228 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 WA * 5 |
コンパイルメッセージ
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;
namespace y
{
class Program
{
static void Main(string[] args)
{
int n = int.Parse(Console.ReadLine());
var c = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();
int o = c.Count(x => x == 1);
int t = c.Count(x => x == 2);
string a = "";
if (o == n && n % 2 == 1) a = "A";
if (o == n - 1 && t == 1 && n % 2 == 0) a = "A";
else a = "B";
Console.WriteLine(a);
}
}
}
No