/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.time.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
Instant start = Instant.now() ;
Instant stop = start.plusSeconds( 135L ) ;
Duration d = Duration.between( start , stop ) ;
long minutesPart = d.toMinutes();
long secondsPart = d.minusMinutes( minutesPart ).getSeconds() ;
System.
out.
println( "Interval: " + start
+ "/" + stop
); System.
out.
println( "d.toString(): " + d
); System.
out.
println( "d.getSeconds(): " + d.
getSeconds() ); System.
out.
println( "Elapsed: " + minutesPart
+ "M " + secondsPart
+ "S" ); }
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgppbXBvcnQgamF2YS50aW1lLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCUluc3RhbnQgc3RhcnQgPSBJbnN0YW50Lm5vdygpIDsKICAgICAgICBJbnN0YW50IHN0b3AgPSBzdGFydC5wbHVzU2Vjb25kcyggMTM1TCApIDsKCiAgICAgICAgRHVyYXRpb24gZCA9IER1cmF0aW9uLmJldHdlZW4oIHN0YXJ0ICwgc3RvcCApIDsKCiAgICAgICAgbG9uZyBtaW51dGVzUGFydCA9IGQudG9NaW51dGVzKCk7IAogICAgICAgIGxvbmcgc2Vjb25kc1BhcnQgPSBkLm1pbnVzTWludXRlcyggbWludXRlc1BhcnQgKS5nZXRTZWNvbmRzKCkgOwoKICAgICAgICBTeXN0ZW0ub3V0LnByaW50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