結果

問題 No.485 方程式のお勉強
ユーザー @abcde
提出日時 2019-02-13 22:45:14
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 319 bytes
コンパイル時間 1,734 ms
コンパイル使用メモリ 159,548 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-13 11:15:28
合計ジャッジ時間 1,928 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
    
    // 1. 入力情報取得.
    int A, B;
    cin >> A >> B;
    
    // 2. 方程式の解を計算.
    int ans = (B / A);

    // 3. 後処理.
    if(ans * A == B) cout << ans << endl;
    if(ans * A != B) cout << "NO" << endl;
    return 0;
    
}
0