結果

問題 No.418 ミンミンゼミ
ユーザー olphe
提出日時 2016-11-15 23:18:16
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 185 bytes
コンパイル時間 533 ms
コンパイル使用メモリ 55,432 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-16 02:13:20
合計ジャッジ時間 1,262 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 25
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:9:24: warning: NULL used in arithmetic [-Wpointer-arith]
    9 | for(int i=0;letter[i]!=NULL;i++){
      |                        ^~~~

ソースコード

diff #

#include "iostream"
using namespace std;

char letter[101];
int ans;

int main(){
cin>>letter;
for(int i=0;letter[i]!=NULL;i++){
if(letter[i]=='n')ans++;
}
cout <<ans<<"\n";
return 0;
}
0