Skip to content
Snippets Groups Projects
Commit 4cbfcc15 authored by Pedro Pablo Cardona Arroyave's avatar Pedro Pablo Cardona Arroyave
Browse files

Format method was added

parent c6b8419e
No related branches found
No related tags found
No related merge requests found
......@@ -521,4 +521,14 @@ class Utils{
return Integer.parseInt(brTest.readLine().trim());
}
public static String formatTime(int time){
StringBuilder sb = new StringBuilder();
if(time/360000>0) sb.append(time / 360000).append(":");
int minutes = time % 360000;
if(minutes/60000>0) sb.append(minutes/60000).append(":");
int seconds = time % 60000;
sb.append(seconds);
return sb.toString();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment