Created
November 2, 2011 00:36
-
-
Save mejibyte/1332402 to your computer and use it in GitHub Desktop.
Skeleton for problem 579 from UVa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.io.*; | |
class Main { | |
public static void main(String [] args) throws IOException { | |
BufferedReader cin = new BufferedReader(new InputStreamReader(System.in)); | |
PrintStream cout = System.out; | |
while (true) { | |
String s = cin.readLine(); | |
if (s.equals("0:00")) break; | |
int hour = Integer.valueOf(s.split(":")[0]); | |
int minute = Integer.valueOf(s.split(":")[1]); | |
double answer; | |
// Aquí se tiene las horas en la variable hour y los minutos en la variable minute. | |
// Usando estos dos datos, calcular aquí la respuesta y guardarla en la variable answer. | |
cout.printf("%.3f\n", answer); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment