結果
| 問題 | No.467 隠されていたゲーム |
| コンテスト | |
| ユーザー |
fiord
|
| 提出日時 | 2017-02-27 23:58:27 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 712 bytes |
| 記録 | |
| コンパイル時間 | 3,072 ms |
| コンパイル使用メモリ | 103,936 KB |
| 実行使用メモリ | 18,944 KB |
| 最終ジャッジ日時 | 2026-07-25 17:38:41 |
| 合計ジャッジ時間 | 5,226 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 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.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]);
//答えが1のとき
int check = Array.IndexOf(d, Math.Max(x, y));
if (check != -1) Console.WriteLine(1);
else Console.WriteLine(Math.Max((int)Math.Ceiling(Math.Max(x, y) / d[n - 1]),2));
}
}
}
fiord