結果
問題 |
No.188 HAPPY DAY
|
ユーザー |
![]() |
提出日時 | 2017-01-31 14:21:13 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 326 bytes |
コンパイル時間 | 112 ms |
コンパイル使用メモリ | 20,992 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-31 01:19:33 |
合計ジャッジ時間 | 529 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
#include <stdio.h> int day_check(int mon){ if(mon==2) return 28; else if(mon==4||mon==6||mon==9||mon==11) return 30; else return 31; } int main(){ int total=0, mon,i; for(mon=1;mon<=12;mon++){ int end = day_check(mon); for(i=1;i<=end;i++){ int x=i/10; int y=i%10; if(mon==(x+y)) total++; } } printf("%d\n",total); return 0; }