← Home
For problem statement at 0-999/400-499/470-479/471/problemC.txt this is a correct solution, but verifier at 0-999/400-499/470-479/471/verifierC.go ends with All 120 tests passed can you fix the verifier? package main

import (
	"fmt"
)

func main() {
	var n int64
	if _, err := fmt.Scan(&n); err != nil {
		return
	}
	count := 0
	for h := int64(1); h*(3*h+1)/2 <= n; h++ {
		if (n+h)%3 == 0 {
			count++
		}
	}
	fmt.Println(count)
}