結果
| 問題 | 
                            No.342 一番ワロタww
                             | 
                    
| コンテスト | |
| ユーザー | 
                             AreTrash
                         | 
                    
| 提出日時 | 2016-04-22 15:56:48 | 
| 言語 | C#(csc)  (csc 3.9.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 71 ms / 5,000 ms | 
| コード長 | 728 bytes | 
| コンパイル時間 | 961 ms | 
| コンパイル使用メモリ | 106,112 KB | 
| 実行使用メモリ | 23,424 KB | 
| 最終ジャッジ日時 | 2024-10-15 13:23:03 | 
| 合計ジャッジ時間 | 2,798 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 14 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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}", "")));
            }
        }
    }
}
            
            
            
        
            
AreTrash