結果
| 問題 |
No.418 ミンミンゼミ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-15 01:03:08 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 22 ms / 1,000 ms |
| コード長 | 550 bytes |
| コンパイル時間 | 869 ms |
| コンパイル使用メモリ | 106,696 KB |
| 実行使用メモリ | 17,920 KB |
| 最終ジャッジ日時 | 2024-07-16 02:25:45 |
| 合計ジャッジ時間 | 2,375 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 25 |
コンパイルメッセージ
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 s = Console.ReadLine();
int ans = 0;
int len = s.Length;
for (int i = 0; i < len - 2; i++) {
if (s[i] == 'm' && s[i + 1] == 'i') {
for (i += 2; i < len; i++) {
if (s[i] == 'n') {
ans++;
break;
} else if (s[i] == '-') continue;
break;
}
}
}
Console.WriteLine(ans);
}
}