結果
| 問題 |
No.559 swapAB列
|
| コンテスト | |
| ユーザー |
heppoko_yuki
|
| 提出日時 | 2018-02-19 23:43:40 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 265 bytes |
| コンパイル時間 | 1,636 ms |
| コンパイル使用メモリ | 165,724 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-16 03:54:27 |
| 合計ジャッジ時間 | 2,111 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < (int)(n); i++)
using namespace std;
int main(){
string S;
cin >> S;
int count = 0, b = 0;
for(auto s : S) {
if(s == 'A') count += b;
else ++b;
}
cout << count;
}
heppoko_yuki