結果
| 問題 | No.1113 二つの整数 / Two Integers |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-17 22:43:11 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 356 bytes |
| 記録 | |
| コンパイル時間 | 989 ms |
| コンパイル使用メモリ | 179,900 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-23 18:30:01 |
| 合計ジャッジ時間 | 1,822 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 7 WA * 8 |
コンパイルメッセージ
In file included from /home/linuxbrew/.linuxbrew/Cellar/gcc/15.2.0_1/include/c++/15/algorithm:62,
from /home/linuxbrew/.linuxbrew/Cellar/gcc/15.2.0_1/include/c++/15/x86_64-pc-linux-gnu/bits/stdc++.h:53,
from main.cpp:1:
In function 'constexpr const _Tp& std::min(const _Tp&, const _Tp&) [with _Tp = long long int]',
inlined from 'int main()' at main.cpp:12:28:
/home/linuxbrew/.linuxbrew/Cellar/gcc/15.2.0_1/include/c++/15/bits/stl_algobase.h:239:7: warning: 'B' is used uninitialized [-Wuninitialized]
239 | if (__b < __a)
| ^~
main.cpp: In function 'int main()':
main.cpp:9:15: note: 'B' was declared here
9 | LL A, B;
| ^
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using LL = long long;
using P = pair<int,int>;
int main(){
LL A, B;
cin >> A, B;
int ans = 0;
for(LL i = 1; i * i <= min(A,B); i++){
if(A%i==0&&B%i==0) ans++;
}
if(ans%2==0) cout << "Even" << endl;
else cout << "Odd" << endl;
return 0;
}