結果
問題 | No.863 計算量 |
ユーザー |
|
提出日時 | 2019-08-16 21:23:00 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 1,802 bytes |
コンパイル時間 | 861 ms |
コンパイル使用メモリ | 107,480 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-22 14:53:13 |
合計ジャッジ時間 | 1,516 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
ソースコード
#include <iostream> #include <cstdio> #include <string> #include <vector> #include <algorithm> #include <functional> #include <iomanip> #include <stdlib.h> #include <string.h> #include <cstring> #include <cmath> #include <map> #include <queue> #include <deque> #include <stack> #include <set> #include <stdio.h> #include <tuple> #include <bitset> #include <cfloat> #include <fstream> #include <limits.h> #include <list> #include <math.h> #include <random> #include <unordered_map> #include <unordered_set> #include <bitset> #include <numeric> #include <utility> #include <sstream> // *テンプレート* #define int long long #define rep(i, n) for (int i = 0; i < (n); i++) #define P pair<int, int> // aよりbの方が小さかったら、aの値をbの値に置き換える。(swapではない!) template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } // aよりbの方が大きかったら、aの値をbの値に置き換える。 template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } const long long MOD = 1000000007; const long long INF = 1LL << 29; using namespace std; typedef long long ll; map<int, int> mp; using Graph = vector<vector<int>>; //最大公約数 ll gcd(ll a, ll b) { if (a < b)swap(a, b); if (b == 0) return a; return gcd(b, a % b); } //最小公倍数 ll lcm(ll a, ll b) { ll g = gcd(a, b); return a / g * b; } // *テンプレートここまで* // pair -> vector<pair<int,int>> // AandB.push_back(make_pair(a[i],b[i])) signed main() { ios_base::sync_with_stdio(0); cin.tie(0); int a, b; cin >> a >> b; int tmp = a * 40; int tmp2 = a * 40 * 40; if (abs(tmp - b) < abs(tmp2 - b)) { cout << 1 << endl; } else { cout << 2 << endl; } return 0; }