結果
| 問題 |
No.559 swapAB列
|
| コンテスト | |
| ユーザー |
aka_rice
|
| 提出日時 | 2017-10-31 22:22:11 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 191 bytes |
| コンパイル時間 | 1,569 ms |
| コンパイル使用メモリ | 165,256 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-22 11:14:13 |
| 合計ジャッジ時間 | 2,127 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
string s;
int a=0,r=0;
cin>>s;
for(int i=0;i<s.size();i++){
if(s[i]=='B') a++;
else r+=a;
}
printf("%d",r);
return 0;
}
aka_rice