結果

問題 No.8083 12歳
ユーザー waidotto
提出日時 2023-01-01 23:36:32
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 385 bytes
コンパイル時間 1,680 ms
コンパイル使用メモリ 191,504 KB
最終ジャッジ日時 2025-02-09 22:54:37
ジャッジサーバーID
(参考情報)
judge1 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 254 WA * 112
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

bool isLeapYear(int y) {
    if(y % 400 == 0) return true;
    if(y % 100 == 0) return false;
    if(y % 4 == 0) return true;
    return false;
}

int main(void) {
    using namespace std;
    int Y, N, D;
    cin >> Y >> N >> D;
    int L;
    L = 365 + (isLeapYear(Y + 1) ? 1 : 0);
    cout << max(N - D, 0) << ' ' << min(L - D, N) << '\n';
    return 0;
}
0