結果

問題 No.1450 nahco314's First Problem
ユーザー ansainansain
提出日時 2021-03-31 18:08:38
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,260 bytes
コンパイル時間 322 ms
コンパイル使用メモリ 82,292 KB
実行使用メモリ 76,368 KB
最終ジャッジ日時 2024-04-26 01:52:47
合計ジャッジ時間 49,827 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
54,432 KB
testcase_01 AC 439 ms
76,328 KB
testcase_02 AC 946 ms
75,916 KB
testcase_03 WA -
testcase_04 AC 41 ms
54,372 KB
testcase_05 AC 455 ms
75,840 KB
testcase_06 TLE -
testcase_07 AC 1,142 ms
76,212 KB
testcase_08 TLE -
testcase_09 AC 1,118 ms
75,892 KB
testcase_10 AC 1,108 ms
76,180 KB
testcase_11 AC 1,109 ms
76,036 KB
testcase_12 AC 1,117 ms
75,864 KB
testcase_13 AC 1,097 ms
75,992 KB
testcase_14 AC 1,083 ms
75,860 KB
testcase_15 AC 1,141 ms
75,864 KB
testcase_16 AC 1,097 ms
75,852 KB
testcase_17 AC 1,089 ms
76,288 KB
testcase_18 TLE -
testcase_19 AC 1,043 ms
76,116 KB
testcase_20 AC 1,121 ms
75,860 KB
testcase_21 AC 1,097 ms
75,868 KB
testcase_22 TLE -
testcase_23 AC 1,109 ms
75,972 KB
testcase_24 AC 1,077 ms
76,044 KB
testcase_25 AC 1,096 ms
75,888 KB
testcase_26 AC 1,102 ms
76,032 KB
testcase_27 AC 1,059 ms
75,996 KB
testcase_28 AC 1,070 ms
76,240 KB
testcase_29 AC 1,126 ms
75,952 KB
testcase_30 AC 1,115 ms
76,228 KB
testcase_31 TLE -
testcase_32 AC 1,102 ms
76,060 KB
testcase_33 TLE -
testcase_34 AC 1,105 ms
75,912 KB
testcase_35 TLE -
testcase_36 TLE -
testcase_37 AC 1,096 ms
75,912 KB
testcase_38 AC 1,047 ms
76,248 KB
testcase_39 AC 1,108 ms
76,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from collections import defaultdict, Counter, deque
from itertools import permutations, combinations, product, combinations_with_replacement, groupby, accumulate
import operator
from math import sqrt, gcd, factorial
# from math import isqrt, prod,comb  # python3.8用(notpypy)
#from bisect import bisect_left,bisect_right
#from functools import lru_cache,reduce
#from heapq import heappush,heappop,heapify,heappushpop,heapreplace
#import numpy as np
#import networkx as nx
#from networkx.utils import UnionFind
#from numba import njit, b1, i1, i4, i8, f8
#from scipy.sparse import csr_matrix
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson, NegativeCycleError
# numba例 @njit(i1(i4[:], i8[:, :]),cache=True) 引数i4配列、i8 2次元配列,戻り値i1
def input(): return sys.stdin.readline().rstrip()
def divceil(n, k): return 1+(n-1)//k  # n/kの切り上げを返す
def yn(hantei, yes='Yes', no='No'): print(yes if hantei else no)


def main():
    mod = 10**9+7
    mod2 = 998244353
    n=int(input())
    for i in range(max(0,n-10**6),n+10**6):
        if i ^ bin(i).count('1')==n:
            print(i)
            return
    print(-1)
        
     


if __name__ == '__main__':
    main()
0