結果
問題 |
No.485 方程式のお勉強
|
ユーザー |
![]() |
提出日時 | 2023-08-01 18:39:04 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 524 bytes |
コンパイル時間 | 3,734 ms |
コンパイル使用メモリ | 251,148 KB |
最終ジャッジ日時 | 2025-02-15 21:21:30 |
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 13 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> using namespace atcoder; using namespace std; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll mod=1000000007; ll inf=1000; int main(){ ll a,b; cin >> a >> b; if (a==0) { if (b==0) { cout << 1 << endl; }else{ cout << "NO" << endl; } }else{ if (b%a==0) { cout << b/a << endl; }else{ cout << "NO" << endl; } } }