結果
| 問題 | No.170 スワップ文字列(Easy) | 
| コンテスト | |
| ユーザー |  jj | 
| 提出日時 | 2017-01-11 21:36:55 | 
| 言語 | Fortran (gFortran 14.2.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 415 bytes | 
| コンパイル時間 | 1,610 ms | 
| コンパイル使用メモリ | 31,104 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-12-23 00:45:48 | 
| 合計ジャッジ時間 | 2,589 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 21 | 
ソースコード
program main
  implicit none
  character*8::S
  integer*8::c(26),fact(8)
  integer*8::i,indx,total
  data c/26*0/,fact/1,2,6,24,120,720,5040,40320/
  read *,S
  do i=1,LEN_TRIM(S)
     indx = ICHAR(S(i:i))-ICHAR('A')+1
     c(indx) = c(indx) + 1
  end do
  total = fact(LEN_TRIM(S))
  do i=1,26
     if(c(i).gt.1) then
        total = total/fact(c(i))
     end if
  end do
  print '(i0)',total -1
end program main
            
            
            
        