結果
| 問題 |
No.721 Die tertia (ディエ・テルツィア)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-19 10:56:08 |
| 言語 | PHP (843.2) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 2,000 ms |
| コード長 | 658 bytes |
| コンパイル時間 | 3,809 ms |
| コンパイル使用メモリ | 30,848 KB |
| 実行使用メモリ | 31,452 KB |
| 最終ジャッジ日時 | 2024-06-22 21:54:50 |
| 合計ジャッジ時間 | 5,476 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
declare(strict_types=1);
$d = new DateTimeImmutable(UtilIO::getString());
$dayAfterTomorrow = $d->add(new DateInterval('P2D'));
UtilIO::echo($dayAfterTomorrow->format('Y/m/d'));
class UtilIO {
protected static string $n = PHP_EOL;
protected function __construct() { }
public static function getString():string {
return trim(fgets(STDIN));
}
public static function getInt():int {
return intval(trim(fgets(STDIN)));
}
public static function echo(string $str):void {
echo static::toLine($str);
}
public static function toLine(string $str):string {
return trim($str).static::$n;
}
}