結果
問題 | No.485 方程式のお勉強 |
ユーザー |
|
提出日時 | 2022-05-23 17:51:14 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 661 bytes |
コンパイル時間 | 1,588 ms |
コンパイル使用メモリ | 169,268 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-20 13:16:15 |
合計ジャッジ時間 | 2,278 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 13 |
ソースコード
#include<bits/stdc++.h> using namespace std; const vector<int> dx_2d = {1,-1,0,0}; const vector<int> dy_2d = {0,0,1,-1}; void Yyy(){ cout << "Yes" << endl; } void Nnn(){ cout << "No" << endl; } void YYY(){ cout << "YES" << endl; } void NNN(){ cout << "NO" << endl; } void fixprecision(){ cout << fixed << setprecision(20); } template<class T> bool chmin(T& a,T b){ if(a > b){ a = b; return true; } else return false; } template<class T> bool chmax(T& a,T b){ if(a < b){ a = b; return true; } else return false; } int main(){ int A,B; cin >> A >> B; if(abs(B)%abs(A) == 0) cout << B/A << endl; else NNN(); }