結果
問題 | No.188 HAPPY DAY |
ユーザー |
![]() |
提出日時 | 2021-11-23 23:32:07 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 532 bytes |
コンパイル時間 | 2,119 ms |
コンパイル使用メモリ | 191,816 KB |
最終ジャッジ日時 | 2025-01-26 00:56:42 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main(){int i, months = 12, a, b, count=0;for(i=1; i< months; i++){for(a=0; a<= 3; a++){b = i-a;if ( (b < 10 and b >= 0) \and (( (i==1 or i==3 or i==5 or i==7 or i==8 or i==10 or i==12) and a*10+b <=31 ) \or (i==2 and a*10+b <=28 ) \or ( (i==4 or i==6 or i==9 or i==11) and a*10+b <=30 ))){count++;}}}cout << count << endl;return 0;}