結果
問題 | No.203 ゴールデン・ウィーク(1) |
ユーザー |
![]() |
提出日時 | 2017-05-17 15:24:32 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 29 ms / 1,000 ms |
コード長 | 698 bytes |
コンパイル時間 | 826 ms |
コンパイル使用メモリ | 111,088 KB |
実行使用メモリ | 26,888 KB |
最終ジャッジ日時 | 2024-11-18 10:13:12 |
合計ジャッジ時間 | 2,552 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { char[] C1 = Console.ReadLine().ToArray(); char[] C2 = Console.ReadLine().ToArray(); List<char> week = new List<char>(); week.AddRange(C1); week.AddRange(C2); List<int> gw = new List<int>(); int holidayCnt = 0; for (int i = 0; i < week.Count(); i++) { if (week[i] == 'o') { holidayCnt++; } else { gw.Add(holidayCnt); holidayCnt = 0; } } gw.Add(holidayCnt); Console.WriteLine(gw.Max()); } }