結果

問題 No.2194 兄弟の掛け引き
ユーザー hiro71687k
提出日時 2023-04-13 07:13:00
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 679 bytes
コンパイル時間 3,764 ms
コンパイル使用メモリ 254,676 KB
最終ジャッジ日時 2025-02-12 05:29:33
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll=long long;
using ld=long double;
ld pie=3.141592653589793;
ll inf=144494;
ll mod=998244353;
int main(){
    ll a,b,c;
    cin >> a >> b >> c;
    bool ok=false;
    vector<ll>ans;
    if (c+b>0)
    {
        if ((c+b)%a==0)
        {
            ans.push_back((c+b)/a);
            ok=true;
        }
    }
        if (c%a==0)
        {
            ans.push_back(c/a);
            ok=true;
        }
    if (!ok)
    {
        ans.push_back(-1);
    }
    sort(ans.begin(),ans.end());
    for (ll i = 0; i < ans.size(); i++)
    {
        cout << ans[i] << endl;
    }
    
}
0