結果
| 問題 |
No.2853 A + B Problem
|
| コンテスト | |
| ユーザー |
prin_kemkem
|
| 提出日時 | 2024-08-25 13:47:37 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 89 ms / 2,000 ms |
| コード長 | 699 bytes |
| コンパイル時間 | 141 ms |
| コンパイル使用メモリ | 82,284 KB |
| 実行使用メモリ | 80,876 KB |
| 最終ジャッジ日時 | 2024-08-25 13:47:41 |
| 合計ジャッジ時間 | 3,770 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
from collections import defaultdict, deque, Counter
# from functools import cache
# import copy
from itertools import combinations, permutations, product, accumulate, groupby, chain
# from more_itertools import distinct_permutations
from heapq import heapify, heappop, heappush
import math
import bisect
from pprint import pprint
from random import randint, shuffle, randrange
import sys
# sys.setrecursionlimit(200000)
input = lambda: sys.stdin.readline().rstrip('\n')
inf = float('inf')
mod1 = 10**9+7
mod2 = 998244353
def ceil_div(x, y): return -(-x//y)
#################################################
N = int(input())
ans = 1
while N:
if N&1: ans *= 2
N >>= 1
print(max(ans-2, 0))
prin_kemkem