結果

問題 No.638 Sum of "not power of 2"
ユーザー asaka189asaka189
提出日時 2018-01-31 15:36:10
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 16 ms / 1,000 ms
コード長 236 bytes
コンパイル時間 539 ms
コンパイル使用メモリ 10,488 KB
実行使用メモリ 7,916 KB
最終ジャッジ日時 2023-08-28 18:22:39
合計ジャッジ時間 1,219 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,856 KB
testcase_01 AC 15 ms
7,772 KB
testcase_02 AC 16 ms
7,800 KB
testcase_03 AC 16 ms
7,748 KB
testcase_04 AC 15 ms
7,800 KB
testcase_05 AC 16 ms
7,904 KB
testcase_06 AC 16 ms
7,916 KB
testcase_07 AC 16 ms
7,800 KB
testcase_08 AC 15 ms
7,804 KB
testcase_09 AC 16 ms
7,756 KB
testcase_10 AC 16 ms
7,744 KB
testcase_11 AC 16 ms
7,796 KB
testcase_12 AC 16 ms
7,804 KB
testcase_13 AC 16 ms
7,868 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = 2
b = n-2
list = []
for i in range(100):
	list.append(2**i)
c = n//2
check = False
while  a <= c:
	a += 1
	b += -1
	if a not in list and b not in list:
		check = True
		break
if check:
	print(a,b)
else:
	print('-1')
0