結果

問題 No.495 (^^*) Easy
ユーザー stone_725
提出日時 2017-04-05 12:12:30
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 304 bytes
コンパイル時間 1,265 ms
コンパイル使用メモリ 158,208 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-08 10:32:41
合計ジャッジ時間 1,751 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>

using namespace std;

int main(){
  string str;
  int l = 0, r = 0;
  cin >> str;
  for(int i = 0; str[i] != '#'; i +=5 ){
    switch(str[i + 1]){
      case '^':
        l++;
        break;
      case '*':
        r++;
        break;
    }
  }
  cout << l << " " << r << "\n";
}
0