2019-06-15 20:27:27 +00:00
|
|
|
package "github.com/ciuak/jvozba"
|
2019-06-15 20:21:54 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"bufio"
|
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"jvozba"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
scanner := bufio.NewScanner(os.Stdin)
|
|
|
|
for scanner.Scan() {
|
|
|
|
in := scanner.Text()
|
|
|
|
res, err := jvozba.Jvozba(in)
|
|
|
|
if err != nil {
|
|
|
|
fmt.Printf("got error: %v\n", err)
|
|
|
|
} else {
|
|
|
|
fmt.Printf("%s → %s (%d)\n", in, res, jvozba.Score(res))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|