結果
問題 |
No.342 一番ワロタww
|
ユーザー |
![]() |
提出日時 | 2020-03-21 14:52:41 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 74 ms / 5,000 ms |
コード長 | 478 bytes |
コンパイル時間 | 941 ms |
コンパイル使用メモリ | 113,580 KB |
実行使用メモリ | 23,552 KB |
最終ジャッジ日時 | 2024-12-22 20:44:06 |
合計ジャッジ時間 | 2,866 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; public static class P { static void Main() { var s = Console.ReadLine().TrimStart('w'); var maxLen = Regex.Matches(s, @"w+").DefaultIfEmpty(Match.Empty).Max(x => x.Value.Length); if (maxLen == 0) return; var res = Regex.Matches(s, $@"([^w]+)w{{{maxLen}}}").Select(x => x.Groups[1].Value).ToArray(); Console.WriteLine(string.Join("\n", res)); } }