結果
問題 | No.254 文字列の構成 |
ユーザー |
|
提出日時 | 2020-09-10 09:37:10 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 103 ms / 5,000 ms |
コード長 | 409 bytes |
コンパイル時間 | 81 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-12-21 16:03:17 |
合計ジャッジ時間 | 3,329 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 30 |
ソースコード
import itertoolsfrom math import isqrtN = int(input())ans = ''sqN = isqrt(N)it_ab = itertools.cycle('ab')for _ in range(sqN * 2 - 1):ans += next(it_ab)N -= sqN ** 2sqN = isqrt(N)it_ab = itertools.cycle('cd')for _ in range(sqN * 2 - 1):ans += next(it_ab)N -= sqN ** 2it_xyz = itertools.cycle('xyz')for _ in range(N):ans += next(it_xyz)# assert len(ans) <= 10 ** 5print(ans)