← Home
For problem statement at 0-999/700-799/720-729/724/problemA.txt this is a correct solution, but verifier at 0-999/700-799/720-729/724/verifierA.go ends with All 100 tests passed can you fix the verifier? package main

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

func main() {
	in := bufio.NewReader(os.Stdin)

	var a, b string
	fmt.Fscan(in, &a, &b)

	days := map[string]int{
		"monday":    0,
		"tuesday":   1,
		"wednesday": 2,
		"thursday":  3,
		"friday":    4,
		"saturday":  5,
		"sunday":    6,
	}

	diff := (days[b] - days[a] + 7) % 7
	if diff == 0 || diff == 2 || diff == 3 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}