結果

問題 No.2194 兄弟の掛け引き
ユーザー ineedyourlovepineedyourlovep
提出日時 2023-01-20 21:31:52
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 517 bytes
コンパイル時間 1,921 ms
コンパイル使用メモリ 204,412 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-05 13:42:02
合計ジャッジ時間 2,728 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,384 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 WA -
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 WA -
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 2 ms
4,380 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

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) 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