Rezultati

Up. imeNalogaJezikRezultatČas oddaje
veseleveverce-2018 Podnapisi Java 0/100Napaka med izvajanjem / ob izhodu (RTE) 10. maj '18 @ 18:15

Test Točke Porabljen spomin Porabljen čas Status
#1 0/7 35,086 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Exception in thread "main" java.lang.NumberFormatException: For input string: "23,001"
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
	at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.lang.Double.parseDouble(Double.java:538)
	at podnapisi.main(podnapisi.java:14)
#2 0/7 38,445 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Exception in thread "main" java.lang.NumberFormatException: For input string: "23,021"
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
	at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.lang.Double.parseDouble(Double.java:538)
	at podnapisi.main(podnapisi.java:14)
#3 0/7 37,605 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Exception in thread "main" java.lang.NumberFormatException: For input string: "00,000"
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
	at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.lang.Double.parseDouble(Double.java:538)
	at podnapisi.main(podnapisi.java:14)
#4 0/7 39,180 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Exception in thread "main" java.lang.NumberFormatException: For input string: "11,992"
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
	at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.lang.Double.parseDouble(Double.java:538)
	at podnapisi.main(podnapisi.java:14)
#5 0/7 36,828 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Exception in thread "main" java.lang.NumberFormatException: For input string: "23,879"
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
	at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.lang.Double.parseDouble(Double.java:538)
	at podnapisi.main(podnapisi.java:14)
#6 0/7 39,594 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Exception in thread "main" java.lang.NumberFormatException: For input string: "23,001"
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
	at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.lang.Double.parseDouble(Double.java:538)
	at podnapisi.main(podnapisi.java:14)
#7 0/7 35,398 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Exception in thread "main" java.lang.NumberFormatException: For input string: "10,220"
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
	at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.lang.Double.parseDouble(Double.java:538)
	at podnapisi.main(podnapisi.java:14)
#8 0/7 38,418 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Exception in thread "main" java.lang.NumberFormatException: For input string: "10,220"
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
	at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.lang.Double.parseDouble(Double.java:538)
	at podnapisi.main(podnapisi.java:14)
#9 0/7 42,004 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Exception in thread "main" java.lang.NumberFormatException: For input string: "23,879"
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
	at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.lang.Double.parseDouble(Double.java:538)
	at podnapisi.main(podnapisi.java:14)
#10 0/7 39,695 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Exception in thread "main" java.lang.NumberFormatException: For input string: "00,001"
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
	at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.lang.Double.parseDouble(Double.java:538)
	at podnapisi.main(podnapisi.java:14)
#11 0/7 37,793 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Exception in thread "main" java.lang.NumberFormatException: For input string: "01,300"
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
	at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.lang.Double.parseDouble(Double.java:538)
	at podnapisi.main(podnapisi.java:14)
#12 0/7 35,969 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Exception in thread "main" java.lang.NumberFormatException: For input string: "00,000"
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
	at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.lang.Double.parseDouble(Double.java:538)
	at podnapisi.main(podnapisi.java:14)
#13 0/8 37,281 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Exception in thread "main" java.lang.NumberFormatException: For input string: "23,540"
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
	at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.lang.Double.parseDouble(Double.java:538)
	at podnapisi.main(podnapisi.java:14)
#14 0/8 36,695 MiB 0,000 s Program je končal z neničelno kodo
Stderr:
Exception in thread "main" java.lang.NumberFormatException: For input string: "23,500"
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
	at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.lang.Double.parseDouble(Double.java:538)
	at podnapisi.main(podnapisi.java:14)

Ocenjevani program (podnapisi.java):
import java.util.Objects;
import java.util.Scanner;

/**
 * Created by veseleveverce-2018 on 5/10/18.
 */
public class podnapisi {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] shift = sc.nextLine().split(" ");
        String[] cajt = shift[1].split(":");
        int ure = Integer.parseInt(cajt[0]);
        int minute = Integer.parseInt(cajt[1]);
        double sekunde = Double.parseDouble(cajt[2]);
        boolean poPresledku = true;
        while(sc.hasNext()){
            int vrstica = sc.nextInt();
            String[] tf = sc.nextLine().trim().split("-->");
            String bes = "";
            String [] prej = tf[0].split(":");
            String [] poj = tf[1].split(":");
            int ura1 = Integer.parseInt(prej[0]);
            int minuta1 = Integer.parseInt(prej[1]);
            double sekunda1 = Double.parseDouble((prej[2].replace(",",".")));
            int ura2 = Integer.parseInt(poj[0]);
            int minuta2 = Integer.parseInt(poj[1]);
            double sekunda2 = Double.parseDouble((poj[2].replace(",",".")));

            sekunda1 += sekunde;
            if(sekunda1>=60) {
                minuta1 += 1;
                sekunda1 -= 60;
            }
            if(minuta1>=60) {
                ura1 += 1;
                minuta1 -= 60;
            }
            sekunda2 += sekunde;
            if(sekunda2>=60) {
                minuta2 += 1;
                sekunda2 -= 60;
            }
            if(minuta2>=60) {
                ura2 += 1;
                minuta2 -= 60;
            }
            System.out.println(vrstica);
            System.out.printf("%02d:%02d:%02.3f --> %02d:%02d:%02.3f",ura1, minuta1, sekunda1, ura2, minuta2, sekunda2);
            while(!Objects.equals(sc.nextLine(), "\n")){
                System.out.println(sc.nextLine());
            }
            System.out.println();
        }
    }
}