← Home
For problem statement at 0-999/200-299/260-269/268/problemB.txt this is a correct solution, but verifier at 0-999/200-299/260-269/268/verifierB.go ends with All tests passed can you fix the verifier? package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()

	var n int64
	fmt.Fscan(in, &n)
	ans := n * (n*n + 5) / 6
	fmt.Fprintln(out, ans)
}