結果
問題 | No.1113 二つの整数 / Two Integers |
ユーザー |
|
提出日時 | 2020-08-16 21:16:56 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 485 bytes |
コンパイル時間 | 936 ms |
コンパイル使用メモリ | 89,624 KB |
最終ジャッジ日時 | 2025-01-13 02:06:58 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 |
ソースコード
#include <string> #include <iostream> #include <algorithm> #include <cmath> #include <set> using namespace std; using ll = long long; ll gcd(long long a, long long b){ if (a%b == 0) return(b); else return(gcd(b, a%b)); } void solve(ll n) { ll a = sqrt(n); if(a*a == n) cout << "Odd" << endl; else cout << "Even" << endl; } int main() { long long a, b; cin >> a; cin >> b; //cout << gcd(a,b) << endl; solve(gcd(a,b)); return 0; }