結果

問題 No.1619 Coccinellidae
ユーザー googol_S0googol_S0
提出日時 2021-07-22 21:28:01
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 322 bytes
コンパイル時間 268 ms
コンパイル使用メモリ 86,892 KB
実行使用メモリ 89,360 KB
最終ジャッジ日時 2023-09-24 15:36:34
合計ジャッジ時間 4,827 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,436 KB
testcase_01 AC 174 ms
85,548 KB
testcase_02 WA -
testcase_03 AC 73 ms
71,204 KB
testcase_04 AC 106 ms
88,520 KB
testcase_05 WA -
testcase_06 AC 73 ms
71,268 KB
testcase_07 AC 97 ms
83,656 KB
testcase_08 WA -
testcase_09 AC 72 ms
71,292 KB
testcase_10 AC 97 ms
82,384 KB
testcase_11 WA -
testcase_12 AC 73 ms
71,444 KB
testcase_13 AC 105 ms
88,424 KB
testcase_14 WA -
testcase_15 AC 73 ms
71,056 KB
testcase_16 AC 73 ms
71,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M,K=map(int,input().split())
A=list(range(N))
A[-1]+=M-sum(A)
ANS=[]
F=0
for i in range(N):
  if i<=K:
    ANS.append(A[i])
    K-=i
    if K==0:
      ANS=ANS[::-1]
      F=1
  elif K==0:
    ANS.append(A[i])
  else:
    ANS=ANS[::-1]
    ANS.insert(K,A[i])
    K=0
    F=1
if F==0:
  ANS=ANS[::-1]
print(*ANS,sep='\n')
0