結果
| 問題 | No.816 Beautiful tuples |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-06-25 21:30:21 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,500 ms |
| コード長 | 373 bytes |
| 記録 | |
| コンパイル時間 | 532 ms |
| コンパイル使用メモリ | 67,840 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-23 08:12:51 |
| 合計ジャッジ時間 | 1,283 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}