結果
問題 |
No.1113 二つの整数 / Two Integers
|
ユーザー |
|
提出日時 | 2020-11-13 01:21:47 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 542 bytes |
コンパイル時間 | 690 ms |
コンパイル使用メモリ | 73,676 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-22 19:49:43 |
合計ジャッジ時間 | 1,332 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <cmath> using namespace std; long long gcd(long long x, long long y){ if(x % y == 0) return y; return gcd(y, x % y); } int main(){ long long A, B; cin >> A >> B; long long temp = gcd(A, B); double t = sqrt((double)temp); long long t1 = t; for(long long i = max(0LL, t1 - 1); i <= t1 + 1; i++){ if(i * i == temp) { cout << "Odd" << endl; return 0; } } cout << "Even" << endl; }