結果
問題 |
No.188 HAPPY DAY
|
ユーザー |
|
提出日時 | 2025-09-22 09:49:51 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 624 bytes |
コンパイル時間 | 2,684 ms |
コンパイル使用メモリ | 275,000 KB |
実行使用メモリ | 7,712 KB |
最終ジャッジ日時 | 2025-09-22 09:49:54 |
合計ジャッジ時間 | 3,399 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
#include <bits/stdc++.h> [[nodiscard]] static inline constexpr uint_fast32_t solve() noexcept { uint_fast32_t ans = 0; for (uint_fast32_t X = 1; X <= 12; ++X) { const auto count_in_month = [&](const uint_fast32_t final_day) constexpr noexcept -> void { for (uint_fast32_t Y = 1; Y <= final_day; ++Y) if (X == Y / 10 + Y % 10) ++ans; }; if (X == 2) count_in_month(28); else if ((X <= 7) ^ (X & 1)) count_in_month(30); else count_in_month(31); } return ans; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); std::cout << solve() << '\n'; return 0; }