Skip to content

Instantly share code, notes, and snippets.

@mejibyte
Created November 2, 2011 00:36
Show Gist options
  • Save mejibyte/1332402 to your computer and use it in GitHub Desktop.
Save mejibyte/1332402 to your computer and use it in GitHub Desktop.
Skeleton for problem 579 from UVa
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