import java.time.Duration;
public class Main {
public static void main
(String[] args
) { System.
out.
println(durationToMillis
("10:00")); }
static long durationToMillis
(String strDuration
) { String[] arr
= strDuration.
split(":"); Duration duration = Duration.ZERO;
if (arr.length == 2) {
strDuration = "PT" + arr[0] + "M" + arr[1] + "S";
duration = Duration.parse(strDuration);
}
return duration.toMillis();
}
}
aW1wb3J0IGphdmEudGltZS5EdXJhdGlvbjsKCnB1YmxpYyBjbGFzcyBNYWluIHsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFyZ3MpIHsKCQlTeXN0ZW0ub3V0LnByaW50bG4oZHVyYXRpb25Ub01pbGxpcygiMTA6MDAiKSk7Cgl9CgoJc3RhdGljIGxvbmcgZHVyYXRpb25Ub01pbGxpcyhTdHJpbmcgc3RyRHVyYXRpb24pIHsKCQlTdHJpbmdbXSBhcnIgPSBzdHJEdXJhdGlvbi5zcGxpdCgiOiIpOwoJCUR1cmF0aW9uIGR1cmF0aW9uID0gRHVyYXRpb24uWkVSTzsKCQlpZiAoYXJyLmxlbmd0aCA9PSAyKSB7CgkJCXN0ckR1cmF0aW9uID0gIlBUIiArIGFyclswXSArICJNIiArIGFyclsxXSArICJTIjsKCQkJZHVyYXRpb24gPSBEdXJhdGlvbi5wYXJzZShzdHJEdXJhdGlvbik7CgkJfQoJCXJldHVybiBkdXJhdGlvbi50b01pbGxpcygpOwoJfQp9