結果
問題 |
No.418 ミンミンゼミ
|
ユーザー |
![]() |
提出日時 | 2023-06-30 11:31:03 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 452 bytes |
コンパイル時間 | 108 ms |
コンパイル使用メモリ | 30,080 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-06 23:56:21 |
合計ジャッジ時間 | 935 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 25 |
ソースコード
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <math.h> #include <string.h> int main() { char str[101] = ""; char min[4] = ""; int cnt = 0; int minCnt = 0; scanf("%s", str); for (int i = 0;str[i] != '\0';i++) { if (str[i] == '-') { continue; } min[cnt] = str[i]; cnt++; if (cnt == 3) { cnt = 0; if (strcmp("min", min) == 0) { minCnt++; } } } printf("%d\n", minCnt); return 0; }