L1-082 种钻石
2019 年 10 月 29 日,中央电视台专题报道,中国科学院在培育钻石领域,取得科技突破。科学家们用金刚石的籽晶片作为种子,利用甲烷气体在能量作用下形成碳的等离子体,慢慢地沉积到钻石种子上,一周“种”出了一颗 1 克拉大小的钻石。
本题给出钻石的需求量和人工培育钻石的速度,请你计算出货需要的时间。
输入格式:
输入在一行中给出钻石的需求量 N(不超过 107 的正整数,以微克拉
为单位)和人工培育钻石的速度 v(1≤v≤200,以微克拉/天
为单位的整数)。
输出格式:
在一行中输出培育 N 微克拉钻石需要的整数天数。不到一天的时间不算在内。
输入样例:
tex
102000 130
102000 130
输出样例:
tex
784
784
Solution:
java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String[] input = in.readLine().split(" ");
int n = Integer.parseInt(input[0]);
int v = Integer.parseInt(input[1]);
System.out.println(n / v);
}
}
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String[] input = in.readLine().split(" ");
int n = Integer.parseInt(input[0]);
int v = Integer.parseInt(input[1]);
System.out.println(n / v);
}
}