結果
問題 |
No.188 HAPPY DAY
|
ユーザー |
![]() |
提出日時 | 2016-03-27 22:01:13 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 0 ms / 1,000 ms |
コード長 | 353 bytes |
コンパイル時間 | 473 ms |
コンパイル使用メモリ | 20,992 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-30 21:19:00 |
合計ジャッジ時間 | 796 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
#include<stdio.h> int main(void){ int day_array[12]={31,28,31,30,31,30,31,31,30,31,30,31}; int month,day; int happy_day=0; int day_total=0; for(month=1;month<=12;month++){ for(day=1;day<=day_array[month-1];day++){ day_total=0; day_total = day/10; day_total += day%10; if(month==day_total){ happy_day++; } } } printf("%d",happy_day); return 0; }