郑州轻工业大学OJ:java1015

import java.util.Scanner;

public class Main {
public static void main(String args[]) {
Scanner cin=new Scanner(System.in);
String str=cin.nextLine();
int sum,p;

char a[]=str.toCharArray();

sum=(a[0]-‘0’)103600+(a[1]-‘0’)*3600+(a[3]-‘0’)6010+(a[4]-‘0’)*60+(a[6]-‘0’)*10+(a[7]-‘0’);

String str1=cin.nextLine();

int sum1;
char a1[]=str1.toCharArray();

sum1=(a1[0]-‘0’)103600+(a1[1]-‘0’)*3600+(a1[3]-‘0’)6010+(a1[4]-‘0’)*60+(a1[6]-‘0’)*10+(a1[7]-‘0’);

p=sum1-sum;
System.out.println§;
}

}

你可能感兴趣的:(郑州轻工业大学OJ:java1015)