結果

問題 No.721 Die tertia (ディエ・テルツィア)
ユーザー DeAKetsu
提出日時 2019-06-03 12:19:50
言語 Java
(openjdk 23)
結果
AC  
実行時間 214 ms / 2,000 ms
コード長 523 bytes
コンパイル時間 2,279 ms
コンパイル使用メモリ 74,836 KB
実行使用メモリ 55,292 KB
最終ジャッジ日時 2024-09-17 20:23:49
合計ジャッジ時間 7,662 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.text.SimpleDateFormat;

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

	    String input = sc.nextLine();

	    String[] inputArr = input.split("/");

	    Calendar cal = Calendar.getInstance();

	    cal.set(Integer.parseInt(inputArr[0]), Integer.parseInt(inputArr[1])-1, Integer.parseInt(inputArr[2]) + 2);

	    SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");

	    System.out.println(sdf.format(cal.getTime()));
	}
}
0