codebackup/Java Experiments/A/洗衣服.java
2021-05-08 19:13:12 +08:00

31 lines
630 B
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
Description
X是一个勤劳的小孩总是会帮助大人做家务。现在他想知道对于一根长为L的绳子能晾开多少件宽为W的衣服显然这些衣服不能相互叠压。
Input
多组输入。
每组输入两个整数L,W。
Output
输出答案。
Sample
Input
10 5
10 4
Output
2
2
*/
import java.util.Scanner;
public class Main
{
public static void main(String [] args)
{
Scanner in = new Scanner(System.in);
int L,W;
while(in.hasNextInt())
{
L=in.nextInt();
W=in.nextInt();
System.out.printf("%d\n",L/W);
}
}
}