結果
| 問題 |
No.2194 兄弟の掛け引き
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-01-20 21:42:23 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 350 bytes |
| コンパイル時間 | 1,938 ms |
| コンパイル使用メモリ | 193,260 KB |
| 最終ジャッジ日時 | 2025-02-10 04:39:49 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
long long a,b,c;
cin>>a>>b>>c;
bool ok=false;
for(long long i=1; i<=100000; i++){
long long d=i*a;
if(d>b) d-=b;
if(d==c){
cout<<i<<endl;
ok=true;
}
}
if(!ok){
cout<<-1<<endl;
}
return 0;
}