結果

問題 No.942 プレゼント配り
ユーザー pekempeypekempey
提出日時 2019-12-05 00:12:07
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 221 bytes
コンパイル時間 311 ms
コンパイル使用メモリ 86,848 KB
実行使用メモリ 98,328 KB
最終ジャッジ日時 2023-08-21 07:08:17
合計ジャッジ時間 4,394 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,144 KB
testcase_01 AC 119 ms
98,328 KB
testcase_02 AC 70 ms
71,248 KB
testcase_03 AC 69 ms
71,312 KB
testcase_04 WA -
testcase_05 AC 113 ms
98,236 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 72 ms
71,144 KB
testcase_11 AC 67 ms
71,508 KB
testcase_12 AC 67 ms
71,292 KB
testcase_13 AC 67 ms
71,332 KB
testcase_14 WA -
testcase_15 AC 95 ms
77,556 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 66 ms
71,284 KB
testcase_19 AC 66 ms
71,260 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

N, K = map(int, input().split())

if N * (N + 1) // 2 % K != 0:
  print('No')
  sys.exit()

print('Yes')

for i in range(K):
  a = []
  for j in range(N // K):
    a.append(K * j + (i + j) % K + 1)
  print(*a)
0