結果
問題 |
No.3088 XOR = SUM
|
ユーザー |
|
提出日時 | 2025-04-20 12:49:50 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 401 bytes |
コンパイル時間 | 1,960 ms |
コンパイル使用メモリ | 191,408 KB |
実行使用メモリ | 7,848 KB |
最終ジャッジ日時 | 2025-04-20 12:50:02 |
合計ジャッジ時間 | 11,948 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 1 WA * 21 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll = long long; void solve() { ll n; cin >> n; if (n == 0) { cout << "0 0\n"; return; } ll x = (1ll << (63 - __builtin_clzll(n))); cout << x << ' ' << n - x << '\n'; } int main() { cin.tie(nullptr)->sync_with_stdio(false); int q; cin >> q; while (q--) { solve(); } return 0; }