Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class MinutesSport {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int finish1 = Integer.parseInt(scan.nextLine());
- int finish2 = Integer.parseInt(scan.nextLine());
- int finish3 = Integer.parseInt(scan.nextLine());
- int finish = finish1 + finish2 + finish3;
- if (finish % 60)
- if (finish >= 0 && finish <= 59) {
- System.out.println("0:" + finish);
- } else if (finish >= 60 && finish <=119) {
- System.out.println("1:" + (finish - 60));
- } else if (finish >= 120 && finish <=179) {
- System.out.println("2:" + (finish - 120));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement