← Home
For problem statement at 0-999/100-199/170-179/177/problemB1.txt this is a correct solution, but verifier at 0-999/100-199/170-179/177/verifierB1.go ends with All 123 tests passed. can you fix the verifier? package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	in := bufio.NewReader(os.Stdin)
	var n int64
	fmt.Fscan(in, &n)

	current := n
	sum := n
	temp := n

	for temp%2 == 0 {
		temp /= 2
		current /= 2
		sum += current
	}

	for p := int64(3); p*p <= temp; p += 2 {
		for temp%p == 0 {
			temp /= p
			current /= p
			sum += current
		}
	}

	if temp > 1 {
		current /= temp
		sum += current
	}

	fmt.Print(sum)
}