結果
問題 | No.2842 Birthday |
ユーザー | tama04 |
提出日時 | 2024-08-23 21:18:03 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 301 bytes |
コンパイル時間 | 3,707 ms |
コンパイル使用メモリ | 273,248 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-08-23 21:18:08 |
合計ジャッジ時間 | 4,253 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(void) { int m, d; cin >> m >> d; int ans = -1; if (m < 8) { ans = 23; } else if (m > 8) { ans = 24; } else if (m == 8) { if (d < 22) { ans = 23; } else if (d >= 22) { ans = 24; } } cout << ans << endl; return 0; }