結果
| 問題 |
No.418 ミンミンゼミ
|
| コンテスト | |
| ユーザー |
funakoshi
|
| 提出日時 | 2019-08-20 14:24:40 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 584 bytes |
| コンパイル時間 | 145 ms |
| コンパイル使用メモリ | 29,696 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-06 12:11:42 |
| 合計ジャッジ時間 | 984 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 25 |
ソースコード
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
int main(void)
{
char str[150]="";
int mcnt=0,icnt=0,ncnt=0,min=0;
scanf("%s",str);
for(int i=0;i<strlen(str);i++)
{
if(str[i]=='m')
{
mcnt++;
}
else if (str[i]=='i')
{
icnt++;
}
else if (str[i]=='n')
{
ncnt++;
}
if(mcnt>0&&icnt>0&&ncnt>0)
{
min++;
mcnt--;
icnt--;
ncnt--;
}
}
printf("%d",min);
}
funakoshi