結果
| 問題 |
No.478 一般門松列列
|
| ユーザー |
|
| 提出日時 | 2017-01-27 22:35:12 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 23 ms / 2,000 ms |
| コード長 | 295 bytes |
| コンパイル時間 | 380 ms |
| コンパイル使用メモリ | 6,784 KB |
| 実行使用メモリ | 8,576 KB |
| 最終ジャッジ日時 | 2024-12-23 16:21:44 |
| 合計ジャッジ時間 | 1,739 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 |
ソースコード
n, k = map(int, raw_input().split())
a = [0 for _ in xrange(n)]
for i in xrange(k+2):
a[i] = i
for i in xrange(k+2, n):
if i < 2:
a[i] = i
elif a[i-1] - a[i-2] > 0:
a[i] = a[i-2]-1
else:
a[i] = a[i-2]+1
print ' '.join(map(str, map(lambda x:x+100000, a)))