結果
| 問題 |
No.418 ミンミンゼミ
|
| コンテスト | |
| ユーザー |
suppy193
|
| 提出日時 | 2016-09-12 10:37:42 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 312 bytes |
| コンパイル時間 | 503 ms |
| コンパイル使用メモリ | 20,480 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-16 01:22:28 |
| 合計ジャッジ時間 | 1,123 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 25 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%s", s);
| ^~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void) {
char s[101];
int i;
int cnt = 0;
scanf("%s", s);
i = 0;
while(s[i] != '\0'){
if(s[i] == 'm' && s[i + 1] == 'i'){
i += 2;
while(s[i] != '\0'){
if(s[i] == 'n'){
cnt++;
break;
}
i++;
}
}
i++;
}
printf("%d\n", cnt);
return 0;
}
suppy193