結果
| 問題 | No.632 穴埋め門松列 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-01-19 23:33:20 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,338 bytes |
| コンパイル時間 | 1,003 ms |
| コンパイル使用メモリ | 104,064 KB |
| 実行使用メモリ | 18,688 KB |
| 最終ジャッジ日時 | 2024-12-24 12:53:29 |
| 合計ジャッジ時間 | 1,745 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 6 |
コンパイルメッセージ
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 Program
{
class Program
{
static void Main(string[] args)
{
string[] list = Console.ReadLine().Split();
string output = null;
//?=1の場合
for (int i = 0; i < 3; ++i)
{
if (String.Compare(list[i],"?",true) == 0)
{
list[i] = "1";
}
}
int x1 = int.Parse(list[0]);
int x2 = int.Parse(list[1]);
int x3 = int.Parse(list[2]);
if ((x2 > x1 && x2 > x3) || (x2 < x1 && x2 < x3))
{
output = "1";
}
//?=4の場合
for (int i = 0; i < 3; ++i)
{
if (String.Compare(list[i], "?", true) == 0)
{
list[i] = "4";
}
}
int x4 = int.Parse(list[0]);
int x5 = int.Parse(list[1]);
int x6 = int.Parse(list[2]);
if ((x5 > x4 && x5 > x6) || (x5 < x4 && x5 < x6))
{
output = "4";
}
Console.WriteLine(output);
Console.ReadLine();
}
}
}