結果

問題 No.346 チワワ数え上げ問題
ユーザー ldsyb
提出日時 2016-03-03 20:26:47
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 476 bytes
コンパイル時間 483 ms
コンパイル使用メモリ 55,908 KB
実行使用メモリ 13,880 KB
最終ジャッジ日時 2024-09-24 13:54:36
合計ジャッジ時間 3,973 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 3
other AC * 10 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] == 'c'){
         for(int j = i + 1;j < s.size();j++){
            if(s[j] == 'w'){
               for(int k = j + 1;k < s.size();k++){
                  if(s[k] == 'w'){
                     count++;
                  }
               }
            }
         }
      }
   }
   cout << count << endl;
}
0