結果
問題 | No.188 HAPPY DAY |
ユーザー |
|
提出日時 | 2019-08-23 23:43:49 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 418 bytes |
コンパイル時間 | 560 ms |
コンパイル使用メモリ | 20,992 KB |
実行使用メモリ | 6,816 KB |
最終ジャッジ日時 | 2024-10-13 14:51:58 |
合計ジャッジ時間 | 776 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
#include <stdio.h>int main(void){int day_array[]={31,28,31,30,31,30,31,31,30,31,30,31};int month,day;int day_total=0,happy_days=0;for(month=1;month<=12;month++){for(day=1;day<=day_array[month-1];day++){day_total = day/10+day%10;if(month==day_total){happy_days++;}}}printf ("%d\n",happy_days);return 0;}