結果
問題 | No.495 (^^*) Easy |
ユーザー |
![]() |
提出日時 | 2020-05-03 00:46:06 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 5 ms / 2,000 ms |
コード長 | 393 bytes |
コンパイル時間 | 1,322 ms |
コンパイル使用メモリ | 162,636 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-01-02 07:43:41 |
合計ジャッジ時間 | 1,926 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main() {string s;cin >> s;int sl = s.size();int cl = 0,cr = 0;for (int i = 0; i < sl; i++) {if (s.at(i) == ')') {string x = s.substr(i - 3, 3);if (x == "^^*") {cl++;}else {cr++;}}else if (s.at(i) == '#') {cout << cl << ' ' << cr << endl;return 0;}else {continue;}}}