結果
問題 | No.188 HAPPY DAY |
ユーザー |
|
提出日時 | 2020-07-25 15:50:50 |
言語 | PHP (843.2) |
結果 |
AC
|
実行時間 | 42 ms / 1,000 ms |
コード長 | 502 bytes |
コンパイル時間 | 2,620 ms |
コンパイル使用メモリ | 30,788 KB |
実行使用メモリ | 31,388 KB |
最終ジャッジ日時 | 2024-06-27 07:10:22 |
合計ジャッジ時間 | 505 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php/*** No.188 HAPPY DAY** @see https://yukicoder.me/problems/492*/const TARGET_YEAR = 2015;$countHappyDay = 0;$targetDate = new DateTime(TARGET_YEAR . "-01-01");while ($targetDate->format("Y") == TARGET_YEAR) {$month = (int)$targetDate->format("m");list($tensPlace, $onesPlace) = str_split($targetDate->format("d"));if ($month == $tensPlace + $onesPlace) {$countHappyDay++;}$targetDate->add(new DateInterval("P1D"));}echo $countHappyDay . "\n";