পৃষ্ঠাসমূহ

বৃহস্পতিবার, ২২ জুন, ২০১৭

11247 Income Tax

import java.util.Scanner;

public class IncomeTax11247 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            double m = scanner.nextInt();
            double x = scanner.nextInt();
            if (m == 0 && x == 0) break;

            double result = ((m-1)*100)/(100-x);

            if (Double.isInfinite(result)) {
                System.out.println("Not found");
            } else {
                if (((m-1)*100)%(100-x) == 0) {
                    result = result -1;
                }
                if (result < m) {
                    System.out.println("Not found");
                } else {
                    result = Math.floor(result);
                    System.out.printf("%.0f",result);
                    System.out.println();
                }
            }


        }
    }
}

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন