結果
問題 | No.188 HAPPY DAY |
ユーザー |
|
提出日時 | 2022-12-15 18:26:06 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 498 bytes |
コンパイル時間 | 466 ms |
コンパイル使用メモリ | 31,744 KB |
実行使用メモリ | 6,816 KB |
最終ジャッジ日時 | 2024-11-14 09:00:10 |
合計ジャッジ時間 | 910 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
#include<stdio.h>int daysBy(int month) {if(month==1||month==3||month==5||month==7||month==8||month==10||month==12){return 31;}if(month==2){return 28;}return 30;}int main(){int count;count=0;for(int month=1;month<=12;month++){for(int day=1;day<=daysBy(month);day++){int a;a=(day/10)+(day%10);if(month==a){count++;}}}printf("%d",count);}