ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1820. Ural Steaks

Java 1.8
Posted by Riot 15 Sep 2016 14:17
Компилятор вычисляет все верно, но здесь задача не проходит. Подскажите, знатоки, в чем проблема?

import java.util.Scanner;

public class Main{
    public static void main(String[] args){

        Scanner in = new Scanner(System.in);
        double n = in.nextDouble();
        double k = in.nextDouble();

        if(n>=1&&n<=1000&&k>=1&&k<=1000){
            double a = ((n/k)*2);
            int b = (int)Math.round(a);
            System.out.println(b);
        }
    }
}
Re: Java 1.8
Posted by Oleg Baskakov 15 Sep 2016 16:32
Неверная формула.