結果
| 問題 | No.411 昇順昇順ソート |
| コンテスト | |
| ユーザー |
ヒッキープログラミングするスレ
|
| 提出日時 | 2016-08-12 23:42:37 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 362 bytes |
| コンパイル時間 | 267 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-11-07 15:57:25 |
| 合計ジャッジ時間 | 2,264 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 3 |
| other | WA * 30 |
ソースコード
def get():
return list(map(int, input().strip().split(' ')))
N, K = get()
count = 0
def counting(n, k):
count = 0
s = [k + 1]
while len(s) > 0:
x = s.pop()
if x <= n:
count += 1
s.append(x + 1)
s.append(x + 1)
return count
count = counting(N, K)
if K == 1:
count -= 1
print(count)
ヒッキープログラミングするスレ