結果
問題 | No.188 HAPPY DAY |
ユーザー |
|
提出日時 | 2021-05-31 16:26:22 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 344 bytes |
コンパイル時間 | 131 ms |
コンパイル使用メモリ | 29,568 KB |
実行使用メモリ | 6,816 KB |
最終ジャッジ日時 | 2024-10-11 23:47:12 |
合計ジャッジ時間 | 496 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
#include<stdio.h>int main(void){int month_date[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 };int happyDay = 0;for (int month = 1; month < 12 + 1; month++) {for (int date = 1; date < month_date[month - 1]; date++) {if (month == (date / 10) + (date % 10)){happyDay++;}}}printf("%d\n", happyDay);return 0;}