結果

問題 No.721 Die tertia (ディエ・テルツィア)
ユーザー GrenacheGrenache
提出日時 2018-09-16 17:39:01
言語 Java21
(openjdk 21)
結果
AC  
実行時間 223 ms / 2,000 ms
コード長 1,034 bytes
コンパイル時間 4,199 ms
コンパイル使用メモリ 73,608 KB
実行使用メモリ 57,156 KB
最終ジャッジ日時 2023-09-25 09:02:37
合計ジャッジ時間 9,231 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 208 ms
56,828 KB
testcase_01 AC 222 ms
56,888 KB
testcase_02 AC 219 ms
56,924 KB
testcase_03 AC 213 ms
56,820 KB
testcase_04 AC 223 ms
56,692 KB
testcase_05 AC 194 ms
56,512 KB
testcase_06 AC 203 ms
56,468 KB
testcase_07 AC 219 ms
56,916 KB
testcase_08 AC 205 ms
56,396 KB
testcase_09 AC 215 ms
56,392 KB
testcase_10 AC 208 ms
56,656 KB
testcase_11 AC 220 ms
56,704 KB
testcase_12 AC 203 ms
56,512 KB
testcase_13 AC 202 ms
56,676 KB
testcase_14 AC 220 ms
56,960 KB
testcase_15 AC 219 ms
56,888 KB
testcase_16 AC 205 ms
56,704 KB
testcase_17 AC 198 ms
56,384 KB
testcase_18 AC 212 ms
56,872 KB
testcase_19 AC 217 ms
57,132 KB
testcase_20 AC 221 ms
57,156 KB
権限があれば一括ダウンロードができます

ソースコード

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