結果
| 問題 |
No.721 Die tertia (ディエ・テルツィア)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-02-13 10:11:38 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 534 bytes |
| コンパイル時間 | 2,243 ms |
| コンパイル使用メモリ | 75,284 KB |
| 実行使用メモリ | 57,028 KB |
| 最終ジャッジ日時 | 2024-09-13 09:52:44 |
| 合計ジャッジ時間 | 7,566 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 18 |
ソースコード
import java.text.SimpleDateFormat;
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);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/mm/dd");
System.out.println(sdf.format(cl.getTime()));
}
}