結果
| 問題 |
No.2194 兄弟の掛け引き
|
| コンテスト | |
| ユーザー |
umezo
|
| 提出日時 | 2023-01-20 22:44:36 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 477 bytes |
| コンパイル時間 | 1,731 ms |
| コンパイル使用メモリ | 194,864 KB |
| 最終ジャッジ日時 | 2025-02-10 05:08:57 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 WA * 1 |
ソースコード
#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);
int a,b,c;
cin>>a>>b>>c;
vector<int> A;
for(int i=1;i<=200000;i++){
int 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