結果
| 問題 |
No.721 Die tertia (ディエ・テルツィア)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-02-13 09:53:13 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 532 bytes |
| コンパイル時間 | 2,288 ms |
| コンパイル使用メモリ | 77,064 KB |
| 実行使用メモリ | 58,112 KB |
| 最終ジャッジ日時 | 2024-09-13 09:51:17 |
| 合計ジャッジ時間 | 8,545 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 3 WA * 15 |
ソースコード
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, d);
cl.add(Calendar.DAY_OF_MONTH, 2);
System.out.println(cl.get(Calendar.YEAR)+"/"+String.format("%02d", cl.get(Calendar.MONTH))+"/"+String.format("%02d", cl.get(Calendar.DATE)));
}
}