結果

問題 No.485 方程式のお勉強
ユーザー kichirb3
提出日時 2018-02-27 10:16:57
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 397 bytes
コンパイル時間 1,259 ms
コンパイル使用メモリ 64,512 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-27 20:19:44
合計ジャッジ時間 1,181 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

// No.485 方程式のお勉強
// https://yukicoder.me/problems/no/485
//

#include <iostream>
#include <string>
using namespace std;

string solve(int A, int B);


int main() {
    int A, B;
    cin >> A >> B;

    string ans = solve(A, B);
    cout << ans << endl;
}

string solve(int A, int B) {
    if (B % A == 0) {
        return to_string(B / A);
    } else {
        return "NO";
    }
}
0