URI Problem 1017 Solution in Java

Problem Details Link

Solution:



import java.util.Scanner;

/**
 * @Author : Muhammad Harun-Or-Roshid
 * @E-mail : md.parvez28@gmail.com
 * @Date   : Oct 8, 2016
 * @Time   : 8:06:03 PM
 */
public class Uri1017 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s_time,distance;
        s_time = sc.nextInt();
        distance = sc.nextInt();
        double cost = (double)(distance/12.0)*s_time;
        System.out.printf("%.3f\n",cost);
    }
}

Comments

Popular posts from this blog

URI Problem 1094 Solution in Java

URI Problem 1099 Solution in Java

URI Problem 1012 Solution in Java