結果
| 問題 |
No.559 swapAB列
|
| コンテスト | |
| ユーザー |
ngtkana
|
| 提出日時 | 2020-02-28 19:12:17 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 189 bytes |
| コンパイル時間 | 1,494 ms |
| コンパイル使用メモリ | 165,948 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-13 16:32:07 |
| 合計ジャッジ時間 | 2,352 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
#include<bits/stdc++.h>
int main(){
std::string s;std::cin>>s;
int ans=0,i=0;
for(char c:s){
if(c=='B')i++;
else ans+=i;
}
std::cout<<ans<<std::endl;
}
ngtkana