// Path: src/main/java/com/hackerrank/BeautifulDaysAtTheMovies.java
// static int countBeautiful(int i, int j, int k) {
//     int result = 0;
//     for (int l = i; l <= j; l++) {
//         if (isBeautiful(l, k)) {
//             result++;
//         }
//     }
//     return result;
// }
// 
// Path: src/main/java/com/hackerrank/BeautifulDaysAtTheMovies.java
// static boolean isBeautiful(int i, int k) {
//     return Math.abs(i - reversed(i)) % k == 0;
// }
// 
// Path: src/main/java/com/hackerrank/BeautifulDaysAtTheMovies.java
// static int reversed(int i) {
//     String s = String.valueOf(i);
//     StringBuilder result = new StringBuilder();
//     for (int j = s.length() - 1; j >= 0; j--) {
//         if (j != s.length() || s.charAt(j) != '0') {
//             result.append(s.charAt(j));
//         }
//     }
//     return Integer.valueOf(result.toString());
// }


import org.junit.Test;
import static com.hackerrank.BeautifulDaysAtTheMovies.countBeautiful;
import static com.hackerrank.BeautifulDaysAtTheMovies.isBeautiful;
import static com.hackerrank.BeautifulDaysAtTheMovies.reversed;
import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;
package com.hackerrank;



public class BeautifulDaysAtTheMoviesTest {

    @Test
    public void shouldReverse() {
        assertThat(reversed(123)).isEqualTo(321);
        assertThat(reversed(120)).isEqualTo(21);
    }

    @Test
    public void shouldBeBeautiful() {
// Path: src/main/java/com/hackerrank/BeautifulDaysAtTheMovies.java
// static int countBeautiful(int i, int j, int k) {
//     int result = 0;
//     for (int l = i; l <= j; l++) {
//         if (isBeautiful(l, k)) {
//             result++;
//         }
//     }
//     return result;
// }
// 
// Path: src/main/java/com/hackerrank/BeautifulDaysAtTheMovies.java
// static boolean isBeautiful(int i, int k) {
//     return Math.abs(i - reversed(i)) % k == 0;
// }
// 
// Path: src/main/java/com/hackerrank/BeautifulDaysAtTheMovies.java
// static int reversed(int i) {
//     String s = String.valueOf(i);
//     StringBuilder result = new StringBuilder();
//     for (int j = s.length() - 1; j >= 0; j--) {
//         if (j != s.length() || s.charAt(j) != '0') {
//             result.append(s.charAt(j));
//         }
//     }
//     return Integer.valueOf(result.toString());
// }


// Path: src/test/java/com/hackerrank/BeautifulDaysAtTheMoviesTest.java
import org.junit.Test;
import static com.hackerrank.BeautifulDaysAtTheMovies.countBeautiful;
import static com.hackerrank.BeautifulDaysAtTheMovies.isBeautiful;
import static com.hackerrank.BeautifulDaysAtTheMovies.reversed;
import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat;

package com.hackerrank;



public class BeautifulDaysAtTheMoviesTest {

    @Test
    public void shouldReverse() {
        assertThat(reversed(123)).isEqualTo(321);
        assertThat(reversed(120)).isEqualTo(21);
    }

    @Test
    public void shouldBeBeautiful() {
        assertThat(isBeautiful(20, 6)).isTrue();