题目地址:https://ac.nowcoder.com/acm/contest/3947/C
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main
{
public static void main(String[] args) {
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
// PrintWriter out=new PrintWriter(System.out);
// Scanner scanner=new Scanner(System.in);
try {
String n=null;
String[] m=null;
while(true)
{
n=in.readLine();
if(n.isEmpty())
{
break;
}
m=n.split(" ");
long begin=Long.parseLong(m[0])-1,end=Long.parseLong(m[1]),b1=begin/60,b2=begin%60,e1=end/60,e2=end%60;
if(e2>50)
{
e2=50;
}
if(b2>50)
{
b2=50;
}
System.out.println((e1-b1)*50+e2-b2);
}
in.close();
// out.flush();
// out.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}