← Home
For problem statement at 0-999/600-699/660-669/665/problemA.txt this is a correct solution, but verifier at 0-999/600-699/660-669/665/verifierA.go ends with All tests passed can you fix the verifier? package main

import (
	"fmt"
)

func main() {
	var a, ta int
	fmt.Scan(&a, &ta)
	var b, tb int
	fmt.Scan(&b, &tb)
	var timeStr string
	fmt.Scan(&timeStr)

	var hh, mm int
	fmt.Sscanf(timeStr, "%d:%d", &hh, &mm)

	D := hh*60 + mm
	A := D + ta

	count := 0
	for k := 0; ; k++ {
		t_dep := 300 + k*b
		if t_dep > 1439 {
			break
		}
		if t_dep+tb > D && t_dep < A {
			count++
		}
	}

	fmt.Println(count)
}