結果
問題 |
No.1113 二つの整数 / Two Integers
|
ユーザー |
![]() |
提出日時 | 2020-07-18 00:24:39 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 894 bytes |
コンパイル時間 | 893 ms |
コンパイル使用メモリ | 93,364 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-30 06:38:00 |
合計ジャッジ時間 | 1,432 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 |
ソースコード
/* -*- coding: utf-8 -*- * * 1113.cc: No.1113 二つの整数 / Two Integers - yukicoder */ #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<iostream> #include<string> #include<vector> #include<map> #include<set> #include<stack> #include<list> #include<queue> #include<deque> #include<algorithm> #include<numeric> #include<utility> #include<complex> #include<functional> using namespace std; /* constant */ /* typedef */ typedef long long ll; typedef long double ld; /* global variables */ /* subroutines */ template <typename T> T gcd(T m, T n) { // m > 0, n > 0 if (m < n) swap(m, n); while (n > 0) { T r = m % n; m = n; n = r; } return m; } /* main */ int main() { ll a, b; scanf("%lld%lld", &a, &b); ll g = gcd<ll>(a, b); ll q = sqrtl((ld)g + 0.5); if (q * q == g) puts("Odd"); else puts("Even"); return 0; }