結果

問題 No.418 ミンミンゼミ
ユーザー Haijinn
提出日時 2016-09-22 15:23:39
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 221 bytes
コンパイル時間 209 ms
コンパイル使用メモリ 21,248 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-16 01:25:39
合計ジャッジ時間 948 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 25
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:9:9: warning: implicit declaration of function ‘gets’; did you mean ‘fgets’? [-Wimplicit-function-declaration]
    9 |         gets(s);
      |         ^~~~
      |         fgets
/usr/bin/ld: /tmp/cceJ3hr6.o: in function `main':
main.c:(.text.startup+0x20): 警告: the `gets' function is dangerous and should not be used.

ソースコード

diff #

#include <stdio.h>
#include <string.h>


int main(void)
{
	char s[100];
	
	gets(s);
	int c=strlen(s);
	int i=0;
	int t=0;
	for(i;i<c;i++){
		
		
		if(s[i]=='m'){
			
			t++;
		}
		
		
	}
		
		printf("%d\n",t);
return 0;
}
0