結果
| 問題 | No.2853 A + B Problem |
| コンテスト | |
| ユーザー |
tnakao0123
|
| 提出日時 | 2024-08-29 13:56:22 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 18 ms / 2,000 ms |
| コード長 | 428 bytes |
| 記録 | |
| コンパイル時間 | 135 ms |
| コンパイル使用メモリ | 52,724 KB |
| 実行使用メモリ | 16,128 KB |
| 最終ジャッジ日時 | 2026-07-05 13:46:51 |
| 合計ジャッジ時間 | 1,777 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
/* -*- coding: utf-8 -*-
*
* 2853.cc: No.2853 A + B Problem - yukicoder
*/
#include<cstdio>
#include<algorithm>
using namespace std;
/* constant */
const int BN = 60;
/* typedef */
using ll = long long;
/* global variables */
/* subroutines */
/* main */
int main() {
ll n;
scanf("%lld", &n);
int c = 0;
for (; n > 0; n >>= 1)
if (n & 1) c++;
printf("%lld\n", (1LL << c) - 2);
return 0;
}
tnakao0123