結果
| 問題 | No.816 Beautiful tuples |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-04-21 02:39:04 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 303 bytes |
| 記録 | |
| コンパイル時間 | 1,016 ms |
| コンパイル使用メモリ | 179,640 KB |
| 実行使用メモリ | 9,728 KB |
| 最終ジャッジ日時 | 2026-04-19 12:03:29 |
| 合計ジャッジ時間 | 5,429 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 WA * 1 TLE * 1 -- * 9 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main()
{
int A, B;
int C = -1;
cin >> A >> B;
for(int n = 1; n <= A + B; n++)
{
if ((A + n)%B==0 && (B + n)%A==0 && A!= B && A != n && B != n)
{
C = n;
}
}
cout << C << endl;
return 0;
}