結果
問題 | No.689 E869120 and Constructing Array 3 |
ユーザー |
![]() |
提出日時 | 2018-05-19 00:14:52 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 351 bytes |
コンパイル時間 | 134 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-06-28 14:11:49 |
合計ジャッジ時間 | 3,999 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 13 |
ソースコード
#!python # -*- coding: utf-8 -*- def main(): K = int(input()) i = 0 n = 0 while n + i + 1 < K: i += 1 n += i s = ('1 ' * (i + 1) + '4 4 ' + '3 ' * ((K - n) // 2) + '5 122' * ((K - n) % 2))[:-1] print(i + 1 + 2 + (K - n) // 2 + ((K - n) % 2) * 2) print(s) if __name__ == '__main__': main()