結果
| 問題 | No.170 スワップ文字列(Easy) |
| コンテスト | |
| ユーザー |
kiridaruma
|
| 提出日時 | 2016-05-14 22:31:51 |
| 言語 | D (dmd 2.112.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| + 25µs | |
| コード長 | 372 bytes |
| 記録 | |
| コンパイル時間 | 326 ms |
| コンパイル使用メモリ | 71,936 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-25 22:34:04 |
| 合計ジャッジ時間 | 1,546 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
import std.stdio, std.string, std.conv;
void main(){
int[char] arr;
auto input = readln.strip;
foreach(s; input){
arr[s]++;
}
int ans = factrical(input.length.to!int);
foreach(i; arr){
ans /= factrical(i);
}
(ans - 1).writeln;
}
int factrical(int a){
if(a == 1)return 1;
return a * factrical(a-1);
}
kiridaruma