結果

問題 No.2194 兄弟の掛け引き
ユーザー SSRS
提出日時 2023-01-20 21:21:43
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 363 bytes
コンパイル時間 1,561 ms
コンパイル使用メモリ 168,648 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-23 09:07:16
合計ジャッジ時間 2,205 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
  int A, B, C;
  cin >> A >> B >> C;
  vector<int> ans;
  if (C <= B){
    if (B % A == 0){
      ans.push_back(B / A);
    }
  }
  if ((B + C) % A == 0){
    ans.push_back((B + C) / A);
  }
  if (ans.empty()){
    cout << -1 << endl;
  } else {
    for (int x : ans){
      cout << x << endl;
    }
  }
}
0