結果
| 問題 | No.188 HAPPY DAY |
| コンテスト | |
| ユーザー |
tancahn2380
|
| 提出日時 | 2017-09-12 20:14:39 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 750 bytes |
| コンパイル時間 | 916 ms |
| コンパイル使用メモリ | 84,732 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-31 05:55:28 |
| 合計ジャッジ時間 | 1,163 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
ソースコード
# include <iostream>
# include <algorithm>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <utility>
# include <stack>
# include <queue>
# include <list>
using namespace std;
using LL = long long;
constexpr int MOD = 1000000000 + 7;
//足し算してオーバーフローで死なないように確認しようね
constexpr int INF = 1000000000;
const double PI = acos(-1);
int main() {
int ans = 0;
for (int i = 1; i <= 12; i++) {
int month = 31;
if (i == 2) month = 28;
if (i == 4 || i == 6 || i == 9 || i == 11) month = 30;
for (int j = 1; j <= month; j++) {
int sum = j / 10 + j % 10;
if (i == sum) ans++;
}
}
cout << ans << endl;
}
tancahn2380