結果

問題 No.587 七対子
ユーザー pirorirori_n712
提出日時 2018-08-15 02:32:30
言語 C#(csc)
(csc 3.9.0)
結果
TLE  
実行時間 -
コード長 560 bytes
コンパイル時間 788 ms
コンパイル使用メモリ 106,692 KB
実行使用メモリ 42,848 KB
最終ジャッジ日時 2024-09-24 09:19:40
合計ジャッジ時間 7,170 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other TLE * 1 -- * 34
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Linq;

class No587
{
    static void Main()
    {
        var str = Console.ReadLine();
        var count = 0;
        var ans = "";
        while (0 < str.Length)
        {
            Console.WriteLine(str.Length);
            var temp = str[0];
            str.Remove(0,1);
            if (str.Contains(temp))
            {
                str.Replace(temp.ToString(), "");
                count++;
            }
            else ans = temp.ToString();
        }
        Console.WriteLine(count == 6 ? ans : "Impossible");
    }
}
0