結果

問題 No.467 隠されていたゲーム
ユーザー mbanmban
提出日時 2016-12-22 10:16:30
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 926 bytes
コンパイル時間 1,053 ms
コンパイル使用メモリ 109,872 KB
実行使用メモリ 29,320 KB
最終ジャッジ日時 2024-05-08 10:57:27
合計ジャッジ時間 2,610 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
27,148 KB
testcase_01 AC 28 ms
25,392 KB
testcase_02 AC 29 ms
25,108 KB
testcase_03 AC 29 ms
25,368 KB
testcase_04 AC 29 ms
27,424 KB
testcase_05 AC 30 ms
25,368 KB
testcase_06 AC 30 ms
27,156 KB
testcase_07 AC 30 ms
25,364 KB
testcase_08 AC 31 ms
25,108 KB
testcase_09 AC 30 ms
25,244 KB
testcase_10 AC 31 ms
25,140 KB
testcase_11 AC 31 ms
25,236 KB
testcase_12 AC 30 ms
25,232 KB
testcase_13 AC 30 ms
25,260 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 30 ms
25,496 KB
testcase_18 AC 30 ms
25,236 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 29 ms
25,132 KB
testcase_23 AC 29 ms
23,088 KB
testcase_24 AC 29 ms
25,236 KB
testcase_25 AC 29 ms
27,404 KB
testcase_26 AC 29 ms
27,156 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Text.RegularExpressions;
using System.Linq;

class Magatro
{

    static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        int[] d = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
        int x, y;
        string[] s = Console.ReadLine().Split(' ');
        x = int.Parse(s[0]);
        y = int.Parse(s[1]);
        int max = Math.Max(x, y);
        int dmax = d.Max();
        if (max == 0)
        {
            Console.WriteLine(0);
            return;
        }
        if (d.Contains(max))
        {
            Console.WriteLine(1);
            return;
        }
        if (dmax > max)
        {
            Console.WriteLine(2);
        }
        else
        {
            Console.WriteLine((max + dmax - 1) / dmax);
        }


    }


}
0