結果
| 問題 |
No.559 swapAB列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-01-14 09:53:45 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 554 bytes |
| コンパイル時間 | 805 ms |
| コンパイル使用メモリ | 102,784 KB |
| 実行使用メモリ | 17,408 KB |
| 最終ジャッジ日時 | 2024-12-25 15:32:50 |
| 合計ジャッジ時間 | 1,667 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 7 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
namespace _0446
{
class Program
{
static void Main(string[] args)
{
var s = Console.ReadLine();
var cnt = 0;
var ans = 0;
for (var i = 0; i < s.Length; i++)
{
if (s[i] == 'B')
{
cnt++;
}
else
{
ans += cnt;
}
}
}
}
}