結果
| 問題 | No.721 Die tertia (ディエ・テルツィア) |
| コンテスト | |
| ユーザー |
kerotang
|
| 提出日時 | 2019-06-03 12:19:53 |
| 言語 | PHP (8.5.4) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 968 bytes |
| 記録 | |
| コンパイル時間 | 145 ms |
| コンパイル使用メモリ | 36,656 KB |
| 実行使用メモリ | 37,164 KB |
| 最終ジャッジ日時 | 2026-04-06 10:56:15 |
| 合計ジャッジ時間 | 1,512 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 18 |
コンパイルメッセージ
PHP Deprecated: Non-canonical cast (double) is deprecated, use the (float) cast instead in Main.php on line 42 Deprecated: Non-canonical cast (double) is deprecated, use the (float) cast instead in Main.php on line 42 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