結果

問題 No.721 Die tertia (ディエ・テルツィア)
ユーザー YukimotoPG
提出日時 2019-02-13 10:08:32
言語 Java
(openjdk 23)
結果
AC  
実行時間 248 ms / 2,000 ms
コード長 537 bytes
コンパイル時間 2,470 ms
コンパイル使用メモリ 76,800 KB
実行使用メモリ 58,012 KB
最終ジャッジ日時 2024-09-13 09:52:36
合計ジャッジ時間 8,135 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

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