結果
問題 | No.188 HAPPY DAY |
ユーザー | mahna |
提出日時 | 2020-05-09 18:15:55 |
言語 | PHP (8.3.4) |
結果 |
WA
|
実行時間 | - |
コード長 | 479 bytes |
コンパイル時間 | 755 ms |
コンパイル使用メモリ | 11,908 KB |
実行使用メモリ | 12,312 KB |
最終ジャッジ日時 | 2023-09-20 04:45:10 |
合計ジャッジ時間 | 1,209 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php $month = 12; $y = 2015; $happy_ct = 0; for($i = 1; $i <= $month; $i++) { $last_day = date("$y-$i-t"); $last_day_num = date("d",strtotime($last_day)); for($j = 1; $j <= $last_day_num; $j++) { $j_1 = floor($j / 10); $j_2 = $j % 10; $j_sum = $j_1 + $j_2; if ($i == $j_sum) { $happy_ct++; } } } echo $happy_ct; ?>