結果
問題 |
No.203 ゴールデン・ウィーク(1)
|
ユーザー |
|
提出日時 | 2019-01-25 23:24:07 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 24 ms / 1,000 ms |
コード長 | 488 bytes |
コンパイル時間 | 823 ms |
コンパイル使用メモリ | 109,776 KB |
実行使用メモリ | 25,652 KB |
最終ジャッジ日時 | 2024-11-18 10:33:47 |
合計ジャッジ時間 | 2,455 ms |
ジャッジサーバーID (参考情報) |
judge2 / 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; class Program { static void Main(string[] args) { int maxRest = 0; var str = ""; for (int i = 0; i < 2; i++) str += Console.ReadLine(); int count = 0; for (int i=0; i < str.Length; i++) { if (str[i] == 'o') { count++; maxRest = Math.Max(maxRest, count); } else count = 0; } Console.WriteLine(maxRest); } }