結果

問題 No.188 HAPPY DAY
ユーザー LV3zJigVW57oPGyLV3zJigVW57oPGy
提出日時 2022-08-04 21:29:30
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 682 bytes
コンパイル時間 1,671 ms
コンパイル使用メモリ 143,184 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-12 19:40:19
合計ジャッジ時間 1,539 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int count=0;
  for(int i=0; i<12; i++){
    	if(i+1 == 1 || 3 || 5 || 7 || 8 || 10 || 12){
    		for(int j=0; j<31; j++){
              	if(i+1 == j%10 + j/10){
                  count++;
                }
            }
        }
          else if(i+1 == 4 || 6 || 9 || 11){
    			for(int h=0; h<30; h++){
              		if(i+1 == h % 10 + h /10){
                  	count++;
                    }
                }
          }
          else{
    			for(int k=0; k<28; k++){
              		if(i+1 == k% 10+ k/10){
                  	count++;
                    }
                }
          }
  }
  cout << count;
}
0