結果

問題 No.256 桁の数字を入れ替え (2)
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2018-06-09 13:14:40
言語 Nim
(2.0.2)
結果
AC  
実行時間 9 ms / 2,000 ms
コード長 210 bytes
コンパイル時間 3,503 ms
コンパイル使用メモリ 68,508 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-13 01:48:13
合計ジャッジ時間 4,212 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 9 ms
4,376 KB
testcase_03 AC 9 ms
4,380 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(10, 3) Warning: The bare except clause is deprecated; use `except CatchableError:` instead [BareExcept]

ソースコード

diff #

import strutils, tables
let N = stdin.readLine
var dic = initCountTable[int]()

for n in N:
  dic.inc ($n).parseInt

for i in countdown(9, 0):
  try: write(stdout, repeat($i, dic[i]))
  except: discard

echo()
0