結果
| 問題 |
No.2194 兄弟の掛け引き
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2023-01-22 23:04:28 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 291 bytes |
| コンパイル時間 | 654 ms |
| コンパイル使用メモリ | 66,748 KB |
| 最終ジャッジ日時 | 2025-02-10 06:25:46 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 WA * 2 |
ソースコード
#include <iostream>
using namespace std;
int main(){
long long a,b,c;cin>>a>>b>>c;
bool ok = false;
for(long long i = 1; 1000000 >= i; i++){
if(i*a-b == c || i*a == c){
ok = true;
cout << i << endl;
}
}
if(!ok)cout << -1 << endl;
}