結果
| 問題 | No.816 Beautiful tuples |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-06-25 21:30:21 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,500 ms |
| + 323µs | |
| コード長 | 373 bytes |
| 記録 | |
| コンパイル時間 | 326 ms |
| コンパイル使用メモリ | 82,520 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-27 18:09:15 |
| 合計ジャッジ時間 | 1,717 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 |
ソースコード
#include<iostream>
#include<algorithm>
#include<vector>
typedef long long int ll;
using namespace std;
int main(){
int a,b; cin >>a>>b;
if(a>b){
swap(a,b);
}
if(a*2==b){
cout << a*3 << endl;
return 0;
}
else if(a*3==b){
cout << a*2 << endl;
return 0;
}
else if(a*3==b*2){
cout << a/2 << endl;
return 0;
}
cout << -1 << endl;
return 0;
}