結果
| 問題 | No.188 HAPPY DAY |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-06-14 15:31:27 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 834 bytes |
| コンパイル時間 | 214 ms |
| コンパイル使用メモリ | 30,080 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-31 01:42:18 |
| 合計ジャッジ時間 | 796 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
ソースコード
#include <stdio.h>
int main(void)
{
char month, ten, one, count = 0;
char end[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
for(month = 1; month <= 12; month++){
one = 1;
ten = 0;
while(end[month - 1] >= (ten * 10) + one){
if(one == 10){
one = 0;
ten++;
}
if(month > ten + one){
one++;
continue;
}
else if(month == ten + one)
count++;
ten++;
one = 0;
}
}
printf("%d\n", count);
return 0;
}