結果

問題 No.1619 Coccinellidae
ユーザー googol_S0googol_S0
提出日時 2021-07-22 21:28:01
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 322 bytes
コンパイル時間 195 ms
コンパイル使用メモリ 82,484 KB
実行使用メモリ 88,352 KB
最終ジャッジ日時 2024-07-17 16:22:56
合計ジャッジ時間 3,519 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
51,840 KB
testcase_01 AC 78 ms
85,112 KB
testcase_02 WA -
testcase_03 AC 40 ms
52,096 KB
testcase_04 AC 77 ms
87,552 KB
testcase_05 WA -
testcase_06 AC 38 ms
51,968 KB
testcase_07 AC 71 ms
82,560 KB
testcase_08 WA -
testcase_09 AC 38 ms
52,248 KB
testcase_10 AC 63 ms
77,696 KB
testcase_11 WA -
testcase_12 AC 39 ms
51,968 KB
testcase_13 AC 79 ms
87,252 KB
testcase_14 WA -
testcase_15 AC 38 ms
51,840 KB
testcase_16 AC 39 ms
51,968 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