Editorial for Көше
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Hint 1.
Арманның үйінен дүкенге дейінгі бір бағыттағы уақыт көрші үйлер санына тең. Бұл сан екі үй нөмірінің айырмасының модулі арқылы табылады: \(|x - y|\)
Hint 2.
Егер \(x = y\) болса, Арман дәл дүкен тұрған үйде тұрады, сондықтан жауап (0).
Hint 3.
Есепте барып-келетін уақыт сұралады, сондықтан бір бағыттағы уақытты 2-ге көбейтеміз: \(2 \cdot |x - y|\)