← Home
For problem statement at 1000-1999/1300-1399/1370-1379/1372/problemB.txt this is a correct solution, but verifier at 1000-1999/1300-1399/1370-1379/1372/verifierB.go ends with case 1 failed
input:
1
140893

expected:
140892 1
got:
1 140892

exit status 1 can you fix the verifier? package main

import (
	"fmt"
)

func main() {
	var t int
	if _, err := fmt.Scan(&t); err != nil {
		return
	}
	for i := 0; i < t; i++ {
		var n int
		fmt.Scan(&n)
		p := 0
		for j := 2; j*j <= n; j++ {
			if n%j == 0 {
				p = j
				break
			}
		}
		if p == 0 {
			fmt.Println(1, n-1)
		} else {
			a := n / p
			fmt.Println(a, n-a)
		}
	}
}