結果
問題 |
No.2853 A + B Problem
|
ユーザー |
|
提出日時 | 2024-08-20 19:38:22 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 279 bytes |
コンパイル時間 | 1,796 ms |
コンパイル使用メモリ | 193,236 KB |
最終ジャッジ日時 | 2025-02-23 23:14:36 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 WA * 10 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; long long ans = 0; for(int a = 1; a < n; a++){ int b = n - a; if((a & b) == 0) ans++; } cout << ans << endl; }