結果
| 問題 | No.816 Beautiful tuples |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-04-20 08:17:41 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 306 bytes |
| 記録 | |
| コンパイル時間 | 177 ms |
| コンパイル使用メモリ | 38,912 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-07 11:15:06 |
| 合計ジャッジ時間 | 9,273 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 2 TLE * 4 |
ソースコード
#include <stdio.h>
int main(){
int A,B;
scanf("%d %d", &A, &B);
for(int C = 1;C < A + B; C++){
if(A != C && B != C){
if((A+B)%C == 0 && (B+C) % A == 0 && (C+A)%B==0){
printf("%d",C);
return 0;
}
}
}
printf("-1");
}