結果
| 問題 | No.820 Power of Two |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-07-10 14:14:15 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 342 bytes |
| 記録 | |
| コンパイル時間 | 401 ms |
| コンパイル使用メモリ | 20,696 KB |
| 実行使用メモリ | 15,360 KB |
| 最終ジャッジ日時 | 2026-05-02 23:16:05 |
| 合計ジャッジ時間 | 2,197 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 7 |
ソースコード
def power_of_two(n,k):
x_min = 2**k
x_max = 2**n
counter = 0
x = x_min
if x == 1:
counter = x_max
else:
while x <= x_max:
counter += 1
x += x_min
print('x',x)
return counter
n,k = map(int,input().split())
ans = power_of_two(n,k)
print(ans)