結果
| 問題 |
No.816 Beautiful tuples
|
| コンテスト | |
| ユーザー |
anonymouse777
|
| 提出日時 | 2019-04-19 22:08:01 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 313 bytes |
| コンパイル時間 | 596 ms |
| コンパイル使用メモリ | 57,520 KB |
| 実行使用メモリ | 13,884 KB |
| 最終ジャッジ日時 | 2024-09-22 20:10:05 |
| 合計ジャッジ時間 | 4,639 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 2 TLE * 1 -- * 9 |
ソースコード
#include <iostream>
#include <cmath>
using namespace std;
int main(void){
long long a,b;
cin >> a >> b;
for(long long i=2;i<=(a+b)/2+1;i++){
if( ((a+b)%i==0) && ((a+i)%b==0) && ((b+i)%a==0) && a!=i && b!=i ){
cout << i;
return 0;
}
}
cout << -1;
}
anonymouse777