結果

問題 No.495 (^^*) Easy
ユーザー Aquaplus
提出日時 2017-09-17 23:10:22
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 502 bytes
コンパイル時間 402 ms
コンパイル使用メモリ 56,324 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-08 02:00:49
合計ジャッジ時間 928 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main(void)
{
    string s;
    int i = 0;
    int r = 0;
    int l = 0;

    cin >> s;
    while (true)
    {
        i = s.find("(^^*)", i);
        if (i == string::npos)
            break;
        l++;
        i++;
    }

    i = 0;
    while (true)
    {
        i = s.find("(*^^)", i);
        if (i == string::npos)
            break;
        r++;
        i++;
    }

    cout << l << " " << r << endl;
    return 0;
}
0