結果
問題 | No.559 swapAB列 |
ユーザー | mencotton |
提出日時 | 2018-02-19 16:23:24 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 50 ms / 2,000 ms |
コード長 | 376 bytes |
コンパイル時間 | 1,942 ms |
コンパイル使用メモリ | 99,524 KB |
実行使用メモリ | 22,588 KB |
最終ジャッジ日時 | 2023-09-22 09:07:15 |
合計ジャッジ時間 | 3,385 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 50 ms
22,588 KB |
testcase_01 | AC | 49 ms
20,604 KB |
testcase_02 | AC | 49 ms
20,468 KB |
testcase_03 | AC | 49 ms
20,600 KB |
testcase_04 | AC | 48 ms
20,592 KB |
testcase_05 | AC | 48 ms
22,572 KB |
testcase_06 | AC | 49 ms
20,624 KB |
testcase_07 | AC | 48 ms
18,600 KB |
testcase_08 | AC | 49 ms
22,556 KB |
testcase_09 | AC | 48 ms
18,552 KB |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; namespace _559 { class Program { static void Main(string[] args) { string s = Console.ReadLine(); int ret = 0; int now = 0; for (int i = 0; i < s.Length; i++) { if (s[i] == 'B') now++; else ret += now; } Console.WriteLine(ret); } } }