結果
| 問題 |
No.2194 兄弟の掛け引き
|
| コンテスト | |
| ユーザー |
👑 potato167
|
| 提出日時 | 2023-01-21 02:15:12 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 332 bytes |
| コンパイル時間 | 2,017 ms |
| コンパイル使用メモリ | 197,488 KB |
| 最終ジャッジ日時 | 2025-02-10 06:04:59 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<b;i++)
using ll = long long;
#define all(p) p.begin(),p.end()
int main(){
int A,B,C;
cin>>A>>B>>C;
set<int> s;
if(C<=B&&C%A==0) s.insert(C/A);
if((C+B)%A==0) s.insert((C+B)/A);
if(s.empty()) cout<<"-1\n";
else{
for(auto x:s) cout<<x<<"\n";
}
}
potato167