結果
| 問題 |
No.2194 兄弟の掛け引き
|
| コンテスト | |
| ユーザー |
keisuke6
|
| 提出日時 | 2023-01-20 22:30:21 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 1,000 ms |
| コード長 | 308 bytes |
| コンパイル時間 | 1,747 ms |
| コンパイル使用メモリ | 196,268 KB |
| 最終ジャッジ日時 | 2025-02-10 05:02:05 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
int a,b,c;
cin>>a>>b>>c;
vector<int> S={};
for(int i=1;i<=1e6;i++){
int x = a*i;
if(x > b) x -= b;
if(x == c) S.push_back(i);
}
for(auto x:S) cout<<x<<endl;
if(S.size() == 0) cout<<-1<<endl;
}
keisuke6