結果

問題 No.279 木の数え上げ
ユーザー yuppe19 😺yuppe19 😺
提出日時 2015-09-19 10:57:33
言語 Nim
(2.0.2)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 145 bytes
コンパイル時間 569 ms
コンパイル使用メモリ 48,752 KB
最終ジャッジ日時 2024-04-27 02:10:56
合計ジャッジ時間 1,060 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
/home/judge/data/code/Main.nim(10, 9) Error: type mismatch
Expression: min(dic['t'], dic['r'], dic['e'] div 2)
  [1] dic['t']: int
  [2] dic['r']: int
  [3] dic['e'] div 2: int

Expected one of (first mismatch at [position]):
[1] proc min(x, y: float32): float32
[1] proc min(x, y: float64): float64
[1] proc min(x, y: int16): int16
[1] proc min(x, y: int32): int32
[1] proc min(x, y: int8): int8
[1] proc min[T](x: openArray[T]): T
[3] proc min(x, y: int): int
[3] proc min(x, y: int64): int64
[3] proc min[T: not SomeFloat](x, y: T): T

ソースコード

diff #

import tables

var
  s = stdin.readLine
  dic = initCountTable[char]()

for ch in s:
  dic.inc(ch)

echo min(dic['t'], dic['r'], dic['e'] div 2)
0