結果

問題 No.942 プレゼント配り
ユーザー rlangevinrlangevin
提出日時 2023-10-02 08:48:37
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 293 bytes
コンパイル時間 1,014 ms
コンパイル使用メモリ 87,164 KB
実行使用メモリ 98,232 KB
最終ジャッジ日時 2023-10-02 08:48:43
合計ジャッジ時間 5,510 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 131 ms
98,232 KB
testcase_02 AC 74 ms
71,164 KB
testcase_03 AC 70 ms
71,440 KB
testcase_04 AC 114 ms
79,220 KB
testcase_05 WA -
testcase_06 AC 73 ms
71,484 KB
testcase_07 AC 73 ms
71,524 KB
testcase_08 AC 106 ms
78,596 KB
testcase_09 AC 108 ms
79,388 KB
testcase_10 AC 74 ms
71,312 KB
testcase_11 AC 73 ms
71,424 KB
testcase_12 AC 76 ms
71,164 KB
testcase_13 AC 72 ms
71,360 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 72 ms
71,420 KB
testcase_19 AC 80 ms
71,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
if N % (2 * K):
    print("No")
    exit()

n = N // (2 * K)
ans = [[] for i in range(K)]
now = 1
for i in range(K):
    for _ in range(n):
        ans[i].append(now)
        ans[i].append(N + 1 - now)
        now += 1

print("Yes")
for a in ans:
    print(*a)
0