結果
| 問題 | No.188 HAPPY DAY |
| コンテスト | |
| ユーザー |
projectappbird
|
| 提出日時 | 2019-07-25 00:09:58 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 477 bytes |
| 記録 | |
| コンパイル時間 | 406 ms |
| コンパイル使用メモリ | 53,856 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-06-28 14:28:12 |
| 合計ジャッジ時間 | 732 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
ソースコード
#include <iostream>
int main(){
unsigned char EndAt30[] = {4,6,9,11};
unsigned char PassedSubscript = 0;
unsigned char DayOfMonthEnd = 0;
unsigned char result = 0;
for (unsigned char month = 1;month<=12;month++){
bool judge = (EndAt30[PassedSubscript] == month);
if (judge) PassedSubscript++;
DayOfMonthEnd = (judge) ? 30 : 31;
for (unsigned char date = 1; date<=DayOfMonthEnd;date++){
if (month == date/10 + date%10)result++;
}
}
printf("%d",result);
}
projectappbird