結果

問題 No.188 HAPPY DAY
ユーザー tnakao0123tnakao0123
提出日時 2016-03-25 23:20:08
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 770 bytes
コンパイル時間 1,146 ms
コンパイル使用メモリ 80,808 KB
実行使用メモリ 4,376 KB
最終ジャッジ日時 2023-08-29 05:02:14
合計ジャッジ時間 1,111 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

/* -*- coding: utf-8 -*-
 *
 * 188.cc: No.188 HAPPY DAY - yukicoder
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

int doms[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

/* typedef */

/* global variables */

/* subroutines */

/* main */

int main() {
  int cnt = 0;

  for (int x = 1; x <= 12; x++) {
    for (int y = 1; y <= doms[x]; y++) {
      int sum = y / 10 + y % 10;
      if (x == sum) cnt++;
    }
  }

  printf("%d\n", cnt);
  return 0;
}
0