結果

問題 No.188 HAPPY DAY
ユーザー kr1buki
提出日時 2017-01-31 14:13:34
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 342 bytes
コンパイル時間 246 ms
コンパイル使用メモリ 21,120 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-31 01:19:15
合計ジャッジ時間 621 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#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, mon,i;
for(mon=1;mon<=12;mon++){
int end = day_check(mon);
int y=mon+(int)(mon/10);
for(i=1;i<=end;i++){
int x=(int)(i/10);
if(y==(x+i))
total++;
}
}
printf("%d\n",total);
return 0;
}
0