結果
| 問題 |
No.816 Beautiful tuples
|
| コンテスト | |
| ユーザー |
sinsincoscos
|
| 提出日時 | 2019-04-19 21:24:46 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 302 bytes |
| コンパイル時間 | 510 ms |
| コンパイル使用メモリ | 64,004 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-22 16:13:18 |
| 合計ジャッジ時間 | 1,136 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 WA * 8 |
ソースコード
#include <iostream>
using namespace std;
int A,B,C;
int main(){
cin >> A >> B >> C;
for(int i=1;i*i<=A+B;i++){
if((A+B)%i==0){
if((A+i)%B==0 && (B+i)%A==0){
cout << i << endl;
return 0;
}
}
}
cout << -1 << endl;
}
sinsincoscos