Rezultati

Up. imeNalogaJezikRezultatČas oddaje
scnm1-2018 Podnapisi Java 100/100OK 10. maj '18 @ 18:25

Test Točke Porabljen spomin Porabljen čas Status
#1 7/7 43,941 MiB 0,000 s OK
#2 7/7 44,363 MiB 0,000 s OK
#3 7/7 36,996 MiB 0,000 s OK
#4 7/7 53,047 MiB 0,025 s OK
#5 7/7 36,375 MiB 0,000 s OK
#6 7/7 36,160 MiB 0,000 s OK
#7 7/7 33,957 MiB 0,000 s OK
#8 7/7 35,102 MiB 0,000 s OK
#9 7/7 34,684 MiB 0,000 s OK
#10 7/7 52,656 MiB 0,002 s OK
#11 7/7 33,438 MiB 0,000 s OK
#12 7/7 43,109 MiB 0,000 s OK
#13 8/8 41,691 MiB 0,000 s OK
#14 8/8 36,195 MiB 0,000 s OK

Ocenjevani program (n2.java):
import java.io.*;
import java.util.*;
import java.math.*;

public class n2 {
	static PrintWriter out=new PrintWriter(System.out);
	public static void print(int h,int m,int s,int u) {
		String hs=h+"";
		while(hs.length()<2) {
			hs="0"+hs;
		}
		out.print(hs+":");
		hs=m+"";
		while(hs.length()<2) {
			hs="0"+hs;
		}
		out.print(hs+":");
		hs=s+"";
		while(hs.length()<2) {
			hs="0"+hs;
		}
		out.print(hs+",");
		hs=u+"";
		while(hs.length()<3) {
			hs="0"+hs;
		}
		out.print(hs);
	}
	public static void main(String[] args) throws Exception {
		//BufferedReader in = new BufferedReader(new FileReader("input.txt"));
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer(in.readLine());
		st.nextToken();
		String add=st.nextToken();
		int h=Integer.parseInt(""+add.charAt(0)+add.charAt(1));
		int m=Integer.parseInt(""+add.charAt(3)+add.charAt(4));
		int s=Integer.parseInt(""+add.charAt(6)+add.charAt(7));
		int u=Integer.parseInt(""+add.charAt(9)+add.charAt(10)+add.charAt(11));
		while(true) {
			out.println(in.readLine());
			st=new StringTokenizer(in.readLine());
			String add2=st.nextToken();
			int h2=Integer.parseInt(add2.substring(0,2));
			int m2=Integer.parseInt(add2.substring(3,5));
			int s2=Integer.parseInt(add2.substring(6,8));
			int u2=Integer.parseInt(add2.substring(9,12));
			u2+=u;
			if(u2>=1000) {
				u2-=1000;
				s2++;
			}
			s2+=s;
			if(s2>=60) {
				s2-=60;
				m2++;
			}
			m2+=m;
			if(m2>=60) {
				m2-=60;
				h2++;
			}
			h2+=h;
			print(h2,m2,s2,u2);
			out.print(" "+st.nextToken()+" ");
			String add3=st.nextToken();
			int h3=Integer.parseInt(add3.substring(0,2));
			int m3=Integer.parseInt(add3.substring(3,5));
			int s3=Integer.parseInt(add3.substring(6,8));
			int u3=Integer.parseInt(add3.substring(9,12));
			u3+=u;
			if(u3>=1000) {
				u3-=1000;
				s3++;
			}
			s3+=s;
			if(s3>=60) {
				s3-=60;
				m3++;
			}
			m3+=m;
			if(m3>=60) {
				m3-=60;
				h3++;
			}
			h3+=h;
			print(h3,m3,s3,u3);
			out.println();
			String sts=in.readLine();
			while(!sts.equals("")) {
				out.println(sts);
				if(!in.ready()) {
					out.close();
					return;
				}
				sts=in.readLine();
			}
			out.println();
		}
	}

}