結果
問題 | No.632 穴埋め門松列 |
ユーザー | Risen |
提出日時 | 2018-01-19 21:26:43 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 54 ms / 1,000 ms |
コード長 | 589 bytes |
コンパイル時間 | 2,237 ms |
コンパイル使用メモリ | 101,328 KB |
実行使用メモリ | 23,732 KB |
最終ジャッジ日時 | 2023-08-26 00:01:19 |
合計ジャッジ時間 | 2,694 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 52 ms
21,728 KB |
testcase_01 | AC | 50 ms
23,732 KB |
testcase_02 | AC | 51 ms
21,760 KB |
testcase_03 | AC | 51 ms
21,688 KB |
testcase_04 | AC | 51 ms
21,756 KB |
testcase_05 | AC | 54 ms
19,768 KB |
コンパイルメッセージ
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; class Solution { static void Main() { var c = Console.ReadLine().Split(' '); var result = ""; var one = c.Select(a => (a != "?") ? int.Parse(a) : 1).ToArray(); if (one.Max() == one[1] || one.Min() == one[1]) { result += "1"; } var four = c.Select(a => (a != "?") ? int.Parse(a) : 4).ToArray(); if (four.Max() == four[1] || four.Min() == four[1]) { result += "4"; } Console.WriteLine(result); } }