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