結果
問題 | No.203 ゴールデン・ウィーク(1) |
ユーザー |
![]() |
提出日時 | 2015-06-24 00:20:15 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 26 ms / 1,000 ms |
コード長 | 684 bytes |
コンパイル時間 | 836 ms |
コンパイル使用メモリ | 104,448 KB |
実行使用メモリ | 18,688 KB |
最終ジャッジ日時 | 2024-11-18 09:23:07 |
合計ジャッジ時間 | 2,179 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; using System.Text; class yc2 { static void Main() { string str1 = Console.ReadLine(); string str2 = Console.ReadLine(); int j = 0,cout = 0; int[] hd = new int[15]; str1 += str2; char[] chs = str1.ToCharArray(); for(int i = 0;i<chs.Length;i++) { if (chs[i] == 'x') { hd[j++] = cout; cout = 0; } else if (chs[i] == 'o') { cout++; } } hd[j++] = cout; Console.WriteLine(hd.Max()); } }