結果

問題 No.418 ミンミンゼミ
ユーザー ndifix
提出日時 2016-12-07 17:26:13
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 179 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 20,992 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-16 02:15:15
合計ジャッジ時間 1,032 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 25
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 | scanf("%s",s);
      | ^~~~~~~~~~~~~

ソースコード

diff #

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

int main(){
char s[101];
int i, j;

scanf("%s",s);

j=0;
for(i=0; i<strlen(s); i++){
if(s[i]=='n'){ j+=1; }
}

printf("%d\n",j);
return 0;
}
0