結果
| 問題 | No.188 HAPPY DAY |
| コンテスト | |
| ユーザー |
tnakao0123
|
| 提出日時 | 2016-03-25 23:20:08 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 770 bytes |
| コンパイル時間 | 2,578 ms |
| コンパイル使用メモリ | 83,488 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-30 21:18:25 |
| 合計ジャッジ時間 | 1,962 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
ソースコード
/* -*- 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;
}
tnakao0123