For problem statement at 1000-1999/1000-1099/1030-1039/1032/problemB.txt this is a correct solution, but verifier at 1000-1999/1000-1099/1030-1039/1032/verifierB.go ends with test 4 failed
input:
vlbzgbaicmrajwwhthctcuaxhxkqfdafplsjfbcxoeffrswxpldnjobcsnvlgtemapezqleqyhyzrywjjp
expected: 5 17
vlbzgbaicmrajwwht
hctcuaxhxkqfdafpl
sjfbcxoeffrswxpl*
dnjobcsnvlgtemap*
ezqleqyhyzrywjjp*
got: 5 17
*vlbzgbaicmrajwwh
*thctcuaxhxkqfdaf
*plsjfbcxoeffrswx
pldnjobcsnvlgtema
pezqleqyhyzrywjjp
exit status 1 can you fix the verifier? package main
import (
"fmt"
"os"
)
func main() {
var s string
fmt.Fscan(os.Stdin, &s)
if s == "" {
return
}
L := len(s)
a := (L + 19) / 20
b := (L + a - 1) / a
K := a*b - L
fmt.Printf("%d %d\n", a, b)
idx := 0
for i := 0; i < a; i++ {
stars := 0
if i < K {
stars = 1
}
chars := b - stars
for j := 0; j < stars; j++ {
fmt.Print("*")
}
for j := 0; j < chars; j++ {
fmt.Print(string(s[idx]))
idx++
}
fmt.Println()
}
}