結果
| 問題 | No.1298 OR XOR | 
| コンテスト | |
| ユーザー |  startcpp | 
| 提出日時 | 2022-01-22 15:02:33 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 285 bytes | 
| コンパイル時間 | 514 ms | 
| コンパイル使用メモリ | 64,000 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-27 12:07:48 | 
| 合計ジャッジ時間 | 1,481 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 13 | 
ソースコード
#include <iostream>
using namespace std;
int main() {
	int n;
	cin >> n;
	
	int cnt = 0;
	for (int i = 0; i < 31; i++) {
		if ((n >> i) & 1) cnt++;
	}
	if (cnt <= 1) { cout << "-1 -1 -1" << endl; return 0; }
	
	cout << n << " " << n - (n & -n) << " " << (n & -n) << endl;
	return 0;
}
            
            
            
        