結果
| 問題 |
No.2194 兄弟の掛け引き
|
| コンテスト | |
| ユーザー |
umezo
|
| 提出日時 | 2023-01-20 22:47:31 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 1,000 ms |
| コード長 | 473 bytes |
| コンパイル時間 | 2,152 ms |
| コンパイル使用メモリ | 195,260 KB |
| 最終ジャッジ日時 | 2025-02-10 05:09:55 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(v) v.begin(),v.end()
typedef long long ll;
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
ll a,b,c;
cin>>a>>b>>c;
vector<ll> A;
for(ll i=1;i<=200000;i++){
ll now=i*a;
if(now>b) now-=b;
if(now==c) A.push_back(i);
}
int d=A.size();
if(d==0) cout<<-1<<'\n';
else{
rep(i,d) cout<<A[i]<<'\n';
}
return 0;
}
umezo