結果
問題 |
No.816 Beautiful tuples
|
ユーザー |
|
提出日時 | 2019-04-21 02:39:04 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 303 bytes |
コンパイル時間 | 1,565 ms |
コンパイル使用メモリ | 165,576 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-10-03 10:03:49 |
合計ジャッジ時間 | 5,324 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; }