結果
問題 |
No.1450 nahco314's First Problem
|
ユーザー |
|
提出日時 | 2021-03-31 15:43:22 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 422 bytes |
コンパイル時間 | 849 ms |
コンパイル使用メモリ | 65,792 KB |
最終ジャッジ日時 | 2025-01-20 01:57:48 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 5 WA * 32 |
ソースコード
#line 1 "main.cpp" #include <iostream> using namespace std; using lint = long long; void solve() { lint x; cin >> x; for (int b = 0; b <= 60; ++b) { auto y = (x ^ b); if (__builtin_popcount(y) == b) { cout << y << "\n"; return; } } cout << "-1\n"; } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); solve(); return 0; }