結果

問題 No.346 チワワ数え上げ問題
ユーザー ldsyb
提出日時 2016-03-03 20:30:25
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 424 bytes
コンパイル時間 388 ms
コンパイル使用メモリ 56,944 KB
実行使用メモリ 13,756 KB
最終ジャッジ日時 2024-09-24 13:54:50
合計ジャッジ時間 3,924 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 3
other AC * 9 WA * 1 TLE * 1 -- * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;

int main(){
   string s;
   cin >> s;
   int count = 0;
   for(int i = s.size() - 3;i != -1;i--){
      if(s[i] == 'w'){
         for(int j = i - 1;j != -1;j--){
            if(s[j] == 'w'){
               for(int k = j - 1;k != -1;k--){
                  if(s[k] == 'c') count++;
               }
            }
         }
      }
   }
   cout << count << endl;
}
0