結果
問題 |
No.2194 兄弟の掛け引き
|
ユーザー |
![]() |
提出日時 | 2023-01-20 21:34:57 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 527 bytes |
コンパイル時間 | 2,095 ms |
コンパイル使用メモリ | 197,696 KB |
最終ジャッジ日時 | 2025-02-10 04:30:43 |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 6 WA * 8 |
ソースコード
#include <bits/stdc++.h> #define rep(i, a, n) for(int i = a; i < (n); i++) using namespace std; using ll = long long; using P = pair<int, int>; const int INF = 1001001001; const ll LINF = 1001002003004005006ll; //const int mod = 1000000007; //const int mod = 998244353; int main() { ll a, b, c; cin >> a >> b >> c; set<ll> st; if ((b+c)%a == 0 && a - b > 0) st.insert((b+c)/a); if (c%a == 0) st.insert(c/a); if (st.size() == 0) cout << -1 << endl; else { for (ll i : st) cout << i << endl; } return 0; }