結果

問題 No.467 隠されていたゲーム
ユーザー fiordfiord
提出日時 2017-02-28 00:01:26
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 868 bytes
コンパイル時間 3,772 ms
コンパイル使用メモリ 104,724 KB
実行使用メモリ 25,052 KB
最終ジャッジ日時 2023-09-02 13:37:16
合計ジャッジ時間 5,032 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
18,932 KB
testcase_01 AC 64 ms
20,912 KB
testcase_02 AC 63 ms
21,024 KB
testcase_03 AC 63 ms
20,812 KB
testcase_04 AC 61 ms
18,736 KB
testcase_05 AC 64 ms
22,884 KB
testcase_06 AC 62 ms
22,888 KB
testcase_07 AC 64 ms
20,812 KB
testcase_08 AC 64 ms
22,872 KB
testcase_09 AC 61 ms
20,872 KB
testcase_10 AC 65 ms
22,880 KB
testcase_11 AC 64 ms
22,936 KB
testcase_12 AC 64 ms
20,736 KB
testcase_13 AC 63 ms
20,892 KB
testcase_14 AC 64 ms
20,924 KB
testcase_15 AC 63 ms
20,788 KB
testcase_16 AC 63 ms
20,820 KB
testcase_17 AC 63 ms
20,784 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 65 ms
23,020 KB
testcase_24 AC 64 ms
23,016 KB
testcase_25 AC 64 ms
20,988 KB
testcase_26 AC 64 ms
18,940 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.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplicationSharp
{
	class Program
	{
		static void Main(string[] args)
		{
			int n = int.Parse(Console.ReadLine());
			decimal[] d = new decimal[n];
			String[] s = Console.ReadLine().Split(' ');
			for(int i = 0; i < n; i++)
			{
				d[i] = decimal.Parse(s[i]);
			}
			s = Console.ReadLine().Split(' ');
			decimal x = decimal.Parse(s[0]), y = decimal.Parse(s[1]);
			x = Math.Abs(x);	y = Math.Abs(y);
			//答えが0のとき
			if (x + y == 0)
			{
				Console.WriteLine(0);
				return;
			}
			//答えが1のとき
			int check = Array.IndexOf(d, Math.Max(x, y));
			if (check != -1)
			{
				Console.WriteLine(1);
				return;
			}
			else Console.WriteLine(Math.Max((int)Math.Ceiling(Math.Max(x, y) / d[n - 1]), 2));
		}
	}
}
0