結果

問題 No.651 E869120 and Driving
ユーザー shinwisteriashinwisteria
提出日時 2018-03-04 10:12:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 164 ms / 1,000 ms
コード長 481 bytes
コンパイル時間 3,660 ms
コンパイル使用メモリ 86,404 KB
実行使用メモリ 58,524 KB
最終ジャッジ日時 2023-10-22 07:53:35
合計ジャッジ時間 6,034 ms
ジャッジサーバーID
(参考情報)
judge15 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 163 ms
58,368 KB
testcase_01 AC 163 ms
58,100 KB
testcase_02 AC 162 ms
58,440 KB
testcase_03 AC 158 ms
58,524 KB
testcase_04 AC 158 ms
58,392 KB
testcase_05 AC 161 ms
58,348 KB
testcase_06 AC 164 ms
58,312 KB
testcase_07 AC 162 ms
56,236 KB
testcase_08 AC 161 ms
58,520 KB
testcase_09 AC 158 ms
58,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Scanner;
public class Con651 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int a = s.nextInt();
		s.close();

		int h = 10 , m = 0;
		m += (a % 100) * 60 / 100;
		h += (a / 100) + m / 60;
		h %= 24;
		m %= 60;

		String as = Integer.toString(h) , bs = Integer.toString(m);
		if(as.length() == 1){
			as = "0" + as;
		}
		if(bs.length() == 1){
			bs = "0" + bs;
		}
		System.out.println(as + ":" + bs);

	}

}
0