結果

問題 No.653 E869120 and Lucky Numbers
ユーザー iwkjosec
提出日時 2018-03-24 04:49:53
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 343 bytes
コンパイル時間 928 ms
コンパイル使用メモリ 105,472 KB
実行使用メモリ 28,652 KB
最終ジャッジ日時 2024-06-25 02:41:13
合計ジャッジ時間 3,084 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25 WA * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 static System.Console;

class Program
{
    static void Main()
    {
        var p = ReadLine();
        WriteLine(p[0] == '1' && '1' < p.Last() && p.Last() < '5' && p.Skip(1).Take(p.Length - 2).Select(x => '2' < x && x < '6' ? 0 : 1).Sum() == 0 ? "Yes" : "No");
    }
}
0