結果

問題 No.2194 兄弟の掛け引き
ユーザー ineedyourlovep
提出日時 2023-01-20 21:32:51
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 530 bytes
コンパイル時間 2,203 ms
コンパイル使用メモリ 197,328 KB
最終ジャッジ日時 2025-02-10 04:28:57
ジャッジサーバーID
(参考情報)
judge1 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 6 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#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()
{
  int a, b, c;
  cin >> a >> b >> c;
  set<int> 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 (int i : st) cout << i << endl;
  }
  return 0;
}
0