結果
| 問題 |
No.170 スワップ文字列(Easy)
|
| コンテスト | |
| ユーザー |
AreTrash
|
| 提出日時 | 2016-04-15 17:26:18 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 584 bytes |
| コンパイル時間 | 829 ms |
| コンパイル使用メモリ | 107,696 KB |
| 実行使用メモリ | 25,816 KB |
| 最終ジャッジ日時 | 2024-10-04 10:06:32 |
| 合計ジャッジ時間 | 2,173 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 14 WA * 7 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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);
}
}
}
AreTrash