結果
問題 |
No.559 swapAB列
|
ユーザー |
![]() |
提出日時 | 2018-07-22 13:44:30 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 200 bytes |
コンパイル時間 | 965 ms |
コンパイル使用メモリ | 54,516 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 05:12:43 |
合計ジャッジ時間 | 1,302 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 2 WA * 5 |
ソースコード
#include <iostream> using namespace std; int main(){ string s; int cnt=0,ans=0; for(int i=0;i<s.size();i++){ if(s[i]=='B')cnt++; else ans+=cnt; } cout << ans << endl; return 0; }