結果

問題 No.418 ミンミンゼミ
コンテスト
ユーザー nxteru
提出日時 2017-03-23 15:29:24
言語 C(gnu17)
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=gnu17 -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types -Wno-error=int-conversion -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
AC  
実行時間 3 ms / 1,000 ms
コード長 217 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 194 ms
コンパイル使用メモリ 39,780 KB
最終ジャッジ日時 2026-02-21 23:33:06
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 25
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function 'main':
main.c:8:12: warning: iteration 99 invokes undefined behavior [-Waggressive-loop-optimizations]
    8 |        if(a[b]=='m'){
      |           ~^~~
main.c:7:14: note: within this loop
    7 |     for(b=0;b<=99;b++){
      |             ~^~~~

ソースコード

diff #
raw source code

#include <stdio.h>
int main(void){
    // Here your code !
    int b,c=0;
    char a[99];
    scanf("%s",a);
    for(b=0;b<=99;b++){
       if(a[b]=='m'){
           c+=1;
       }
       
    }
    printf("%d",c);
}
0