結果
| 問題 | No.411 昇順昇順ソート |
| コンテスト | |
| ユーザー |
ヒッキープログラミングするスレ
|
| 提出日時 | 2016-08-12 23:42:37 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 362 bytes |
| 記録 | |
| コンパイル時間 | 780 ms |
| コンパイル使用メモリ | 20,696 KB |
| 実行使用メモリ | 15,360 KB |
| 最終ジャッジ日時 | 2026-05-07 23:28:20 |
| 合計ジャッジ時間 | 5,583 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)
ヒッキープログラミングするスレ