結果

問題 No.721 Die tertia (ディエ・テルツィア)
ユーザー YukimotoPGYukimotoPG
提出日時 2019-02-13 10:08:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 243 ms / 2,000 ms
コード長 537 bytes
コンパイル時間 3,136 ms
コンパイル使用メモリ 74,340 KB
実行使用メモリ 60,220 KB
最終ジャッジ日時 2023-10-11 11:06:48
合計ジャッジ時間 8,912 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 232 ms
59,740 KB
testcase_01 AC 233 ms
59,832 KB
testcase_02 AC 227 ms
59,956 KB
testcase_03 AC 233 ms
59,648 KB
testcase_04 AC 226 ms
59,888 KB
testcase_05 AC 234 ms
59,760 KB
testcase_06 AC 223 ms
60,132 KB
testcase_07 AC 225 ms
59,612 KB
testcase_08 AC 228 ms
59,800 KB
testcase_09 AC 234 ms
57,844 KB
testcase_10 AC 235 ms
59,612 KB
testcase_11 AC 228 ms
59,820 KB
testcase_12 AC 233 ms
59,352 KB
testcase_13 AC 243 ms
60,164 KB
testcase_14 AC 237 ms
59,820 KB
testcase_15 AC 225 ms
59,848 KB
testcase_16 AC 224 ms
59,776 KB
testcase_17 AC 233 ms
59,840 KB
testcase_18 AC 232 ms
60,220 KB
testcase_19 AC 236 ms
60,068 KB
testcase_20 AC 233 ms
59,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {

		Calendar cl = Calendar.getInstance();
		String s = sc.next();
		int y = Integer.parseInt(s.substring(0,4));
		int m = Integer.parseInt(s.substring(5,7));
		int d = Integer.parseInt(s.substring(8,10));
		
		
		cl.set(y, m-1, d);
		cl.add(Calendar.DATE, 2);
		
		
		System.out.println(cl.get(Calendar.YEAR)+"/"+String.format("%02d", cl.get(Calendar.MONTH)+1)+"/"+String.format("%02d", cl.get(Calendar.DATE)));

	}
}
0