結果
| 問題 |
No.721 Die tertia (ディエ・テルツィア)
|
| コンテスト | |
| ユーザー |
kerotang
|
| 提出日時 | 2019-06-03 12:19:53 |
| 言語 | PHP (843.2) |
| 結果 |
AC
|
| 実行時間 | 41 ms / 2,000 ms |
| コード長 | 968 bytes |
| コンパイル時間 | 85 ms |
| コンパイル使用メモリ | 32,400 KB |
| 実行使用メモリ | 32,788 KB |
| 最終ジャッジ日時 | 2024-09-17 20:23:41 |
| 合計ジャッジ時間 | 1,752 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
class Scanner
{
private $arr = [];
private $count = 0;
private $pointer = 0;
/**
* @return mixed
*/
public function next() {
if ($this->pointer >= $this->count) {
$str = trim(fgets(STDIN));
$this->arr = explode(' ', $str);
$this->count = count($this->arr);
$this->pointer = 0;
}
$result = $this->arr[$this->pointer];
$this->pointer++;
return $result;
}
/**
* @return bool
*/
public function hasNext() {
return $this->pointer < $this->count;
}
/**
* @return int
*/
public function nextInt() {
return (int)$this->next();
}
/**
* @return float
*/
public function nextDouble() {
return (double)$this->next();
}
}
// 初期化
$sc = new Scanner();
$str = $sc->next();
$time = date('Y/m/d', strtotime('+2 day', strtotime($str)));
echo $time . "\n";
kerotang