結果

問題 No.342 一番ワロタww
ユーザー AreTrashAreTrash
提出日時 2016-04-22 15:56:48
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 69 ms / 5,000 ms
コード長 728 bytes
コンパイル時間 947 ms
コンパイル使用メモリ 107,520 KB
実行使用メモリ 23,552 KB
最終ジャッジ日時 2024-04-23 13:24:11
合計ジャッジ時間 2,612 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
23,040 KB
testcase_01 AC 69 ms
23,552 KB
testcase_02 AC 69 ms
23,168 KB
testcase_03 AC 68 ms
23,296 KB
testcase_04 AC 67 ms
22,912 KB
testcase_05 AC 67 ms
23,296 KB
testcase_06 AC 68 ms
23,168 KB
testcase_07 AC 68 ms
23,296 KB
testcase_08 AC 66 ms
23,424 KB
testcase_09 AC 65 ms
23,552 KB
testcase_10 AC 65 ms
23,424 KB
testcase_11 AC 65 ms
23,168 KB
testcase_12 AC 66 ms
22,912 KB
testcase_13 AC 66 ms
23,424 KB
testcase_14 AC 59 ms
23,040 KB
testcase_15 AC 59 ms
23,040 KB
testcase_16 AC 68 ms
22,912 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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;
using System.Text.RegularExpressions;

namespace No342_2{
    public class Program{
        public static void Main(string[] args){
            const char constChar = 'w';
            var strList = Regex.Matches(Console.ReadLine(), $"[^{constChar}]+{constChar}+").Cast<Match>().Select(m => m.Value).ToList();

            if(strList.Count == 0){
                Console.WriteLine();
            }else{
                Func<string, int> charCount = s => s.Count(c => c == constChar);
                var max = strList.Max(charCount);
                strList.Where(s => charCount(s) == max).ToList().ForEach(s => Console.WriteLine(s.Replace($"{constChar}", "")));
            }
        }
    }
}
0