結果
問題 |
No.170 スワップ文字列(Easy)
|
ユーザー |
![]() |
提出日時 | 2017-01-11 21:35:14 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 418 bytes |
コンパイル時間 | 2,191 ms |
コンパイル使用メモリ | 31,232 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-21 09:53:16 |
合計ジャッジ時間 | 2,538 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 WA * 3 |
ソースコード
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(indx)) end if end do print '(i0)',total -1 end program main