結果

問題 No.170 スワップ文字列(Easy)
ユーザー GoryudyumaGoryudyuma
提出日時 2015-04-03 20:27:22
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 208 bytes
コンパイル時間 391 ms
コンパイル使用メモリ 18,692 KB
実行使用メモリ 18,976 KB
最終ジャッジ日時 2023-09-17 04:01:59
合計ジャッジ時間 1,911 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
18,876 KB
testcase_01 AC 15 ms
18,928 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 15 ms
18,908 KB
testcase_06 AC 15 ms
18,976 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 16 ms
18,840 KB
testcase_11 AC 16 ms
18,908 KB
testcase_12 AC 15 ms
18,672 KB
testcase_13 AC 15 ms
18,860 KB
testcase_14 AC 16 ms
18,932 KB
testcase_15 AC 16 ms
18,812 KB
testcase_16 AC 16 ms
18,908 KB
testcase_17 AC 15 ms
18,936 KB
testcase_18 WA -
testcase_19 AC 15 ms
18,908 KB
testcase_20 AC 15 ms
18,924 KB
testcase_21 WA -
testcase_22 AC 15 ms
18,972 KB
testcase_23 AC 16 ms
18,840 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php

$a= str_split(trim(fgets(STDIN)));

$c=array();

foreach($a as $b){
    $c[$b]+=1;
}

$ans=  1;
for($i=sizeof($a);$i!=0;$i--){
    $ans*=$i;
}
foreach($c as $b){
    $ans/=$b;
}

echo ($ans-1).PHP_EOL;
0