結果

問題 No.485 方程式のお勉強
ユーザー cureskolcureskol
提出日時 2020-04-03 23:34:02
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 196 bytes
コンパイル時間 1,388 ms
コンパイル使用メモリ 167,132 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-03 06:30:05
合計ジャッジ時間 2,082 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 6 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

signed main(){
    bool f=false;
    int a,b;cin>>a>>b;
    for(int i=-100;i<=100;i++)if(a*i==b){cout<<i<<endl;f=1;}
    if(!f)cout<<-1<<endl;
}
    
0