結果

問題 No.495 (^^*) Easy
ユーザー hotaka0213
提出日時 2019-05-01 15:39:07
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
RE  
実行時間 -
コード長 307 bytes
コンパイル時間 566 ms
コンパイル使用メモリ 54,940 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-31 12:32:39
合計ジャッジ時間 2,314 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 RE * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;
int main(){
	string S;
	cin>>S;
	int x=0,y=0,right=0,left=0;
	while(x==0){
		if(S[y]=='('){
			y++;
		}else if(S[y]=='#'){
			x=1;
		}else if(S[y]=='^'){
			left++;
			y+=5;
		}else{
			right++;
			y+=5;
		}
	}
	cout<<right<<" "<<left;
return 0;
}
0