結果

問題 No.495 (^^*) Easy
ユーザー Kazu05Kazu05
提出日時 2019-02-20 17:57:39
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 962 bytes
コンパイル時間 738 ms
コンパイル使用メモリ 91,604 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-24 19:52:40
合計ジャッジ時間 1,416 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstdio>

using namespace std;

#define REP(i, n) for(int i = 0; i < n;i++)

typedef long long ll;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	/*
	int n, m;
	int a[110];
	cin >> n >> m;
	for (int i = 0; i < n; i++) cin >> a[i];
	for (int i = 0; i < m; i++) {
		for (int j = 0; j < n; j++) {
			if (j % i > (j + 1) % i) swap(a[i], a[i + 1]);
		}
	}
	cout << a[0];
	for (int i = 0; i < n; i++) cout << a[i] << endl;
	*/
	string s;
	cin >> s;
	int r = 0, l = 0;
	for (int i = 0; ; i += 5) {
		if (s[i] != '#') {
			if (s[i + 1] == '^') {
				l++;
			} else {
				r++;
			}
		} else {
			break;
		}
	}
	cout << l << ' ' << r << endl;
}
0