結果
問題 | No.418 ミンミンゼミ |
ユーザー |
|
提出日時 | 2016-09-16 08:54:02 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 199 bytes |
コンパイル時間 | 134 ms |
コンパイル使用メモリ | 20,096 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-16 01:23:46 |
合計ジャッジ時間 | 935 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 25 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:7:15: warning: too many arguments for format [-Wformat-extra-args] 7 | scanf("%s",str,100); | ^~~~ main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%s",str,100); | ^~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(){ char str[100]; int i = 0; int num = 0; scanf("%s",str,100); while(str[i] != '\0'){ if(str[i] == 'n'){ num++; } i++; } printf("%d\n",num); return 0; }