結果

問題 No.721 Die tertia (ディエ・テルツィア)
ユーザー Grenache
提出日時 2018-09-16 17:39:01
言語 Java
(openjdk 23)
結果
AC  
実行時間 199 ms / 2,000 ms
コード長 1,034 bytes
コンパイル時間 3,644 ms
コンパイル使用メモリ 76,180 KB
実行使用メモリ 55,404 KB
最終ジャッジ日時 2024-07-18 07:25:22
合計ジャッジ時間 8,046 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.text.*;
import java.util.*;


public class Main_yukicoder721 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		String ymd = sc.next();

		Calendar cal = Calendar.getInstance();
		
		try {
			cal.setTime(new SimpleDateFormat("yyyy/MM/dd").parse(ymd));
		} catch (ParseException e) {
			// TODO 自動生成された catch ブロック
			e.printStackTrace();
		}
//		pr.println(cal.toString());
		cal.add(Calendar.DAY_OF_MONTH, 2);
//		pr.println(cal.toString());

		pr.println(new SimpleDateFormat("yyyy/MM/dd").format(cal.getTime()));
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(INPUT == null ? System.in : new ByteArrayInputStream(INPUT.getBytes()));
		pr = new Printer(System.out);

		solve();

//		pr.close();
		pr.flush();
//		sc.close();
	}

	static String INPUT = null;

	private static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
}
0