結果

問題 No.170 スワップ文字列(Easy)
コンテスト
ユーザー 6soukiti29
提出日時 2017-10-21 07:06:41
言語 Nim
(2.2.6)
コンパイル:
nim --nimcache=~ --hints:off -o:a.out -d:release cpp _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 204 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,306 ms
コンパイル使用メモリ 67,472 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2026-03-19 20:49:53
合計ジャッジ時間 3,454 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport]
/home/judge/data/code/Main.nim(1, 17) Warning: imported and not used: 'strutils' [UnusedImport]

ソースコード

diff #
raw source code

import sequtils,strutils,math
var
    s = stdin.readline
    cnt : array['A' .. 'Z' , int]

for c in s:
    cnt[c] += 1

var
    A = fac(s.len)
    i : int

for j in cnt:
    A = A div fac(j)

echo(A - 1)
0