結果
| 問題 |
No.495 (^^*) Easy
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-15 20:27:03 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 406 bytes |
| コンパイル時間 | 1,756 ms |
| コンパイル使用メモリ | 192,324 KB |
| 最終ジャッジ日時 | 2025-01-24 14:10:10 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(void)
{
cin.tie(0);
ios::sync_with_stdio(false);
string s;
int l = 0;
int r = 0;
cin >> s;
int n = s.length();
for(int i=0;i<n-1;i+=5)
{
if(s.substr(i,5)=="(^^*)")
{
l++;
}
else
{
r++;
}
}
cout << l << ' ' << r << '\n';
return 0;
}