結果

問題 No.170 スワップ文字列(Easy)
ユーザー AreTrashAreTrash
提出日時 2016-04-15 17:26:18
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 584 bytes
コンパイル時間 1,126 ms
コンパイル使用メモリ 103,040 KB
実行使用メモリ 27,724 KB
最終ジャッジ日時 2024-04-15 02:06:30
合計ジャッジ時間 2,591 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
25,544 KB
testcase_01 AC 24 ms
21,680 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 24 ms
23,856 KB
testcase_06 AC 24 ms
25,664 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 24 ms
21,428 KB
testcase_11 AC 25 ms
23,652 KB
testcase_12 AC 25 ms
23,624 KB
testcase_13 AC 24 ms
23,504 KB
testcase_14 AC 24 ms
25,552 KB
testcase_15 AC 23 ms
21,296 KB
testcase_16 AC 25 ms
23,988 KB
testcase_17 AC 24 ms
25,416 KB
testcase_18 WA -
testcase_19 AC 24 ms
25,556 KB
testcase_20 AC 24 ms
23,640 KB
testcase_21 WA -
testcase_22 AC 24 ms
23,512 KB
testcase_23 AC 23 ms
21,556 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace No170_1{
    public class Program{
        public static void Main(string[] args){
            var str = Console.ReadLine();
            var length = str.Length;
            var charCount = new int[26];
            var result = 1;

            foreach(var s in str)
                charCount[s - 'A']++;

            for(var i = 2; i <= length; i++)
                result *= i;

            foreach(var cc in charCount)
                for(var i = 2; i <= cc; i++)
                    result /= cc;

            Console.WriteLine(--result);
        }
    }
}
0