結果
問題 | No.1113 二つの整数 / Two Integers |
ユーザー |
![]() |
提出日時 | 2020-07-17 21:39:27 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 512 bytes |
コンパイル時間 | 1,487 ms |
コンパイル使用メモリ | 167,384 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-30 06:29:28 |
合計ジャッジ時間 | 2,133 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 |
ソースコード
#include <bits/stdc++.h>using namespace std;#define int long longtypedef pair<int,int> P;int INF = 1e9+7;int mod = 1e9+7;int dx[4] = {1, 0, -1, 0};int dy[4] = {0, 1, 0, -1};int gcd(int X,int Y) {if(X%Y == 0) {return Y;}else {return gcd(Y,X%Y);}}signed main() {int A,B;cin >> A >> B;int X = gcd(A,B);int Y = sqrt(X);double Z = sqrt(X);if(Y != Z) {cout << "Even" << endl;}else {cout << "Odd" << endl;}}