結果
| 問題 |
No.495 (^^*) Easy
|
| コンテスト | |
| ユーザー |
mmn15277198
|
| 提出日時 | 2020-06-11 23:30:16 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 497 bytes |
| コンパイル時間 | 864 ms |
| コンパイル使用メモリ | 92,008 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-24 03:33:04 |
| 合計ジャッジ時間 | 1,429 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 |
ソースコード
#include<iostream>
#include<math.h>
#include<string.h>
#include<vector>
#include<algorithm>
#include<iomanip>
#include<deque>
#include<map>
#include<stdio.h>
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
string s;
cin >> s;
int cnt_L=0,cnt_R=0;
for(int i=0;i<s.size();i++){
if(s[i]=='#'){
break;
}
if(s[i]=='*' && s[i+1]==')'){
cnt_L++;
}else if(s[i]=='(' && s[i+1]=='*'){
cnt_R++;
}
}
cout << cnt_L << " " << cnt_R << endl;
return 0;
}
mmn15277198