結果
| 問題 |
No.254 文字列の構成
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-03-16 14:16:57 |
| 言語 | Python2 (2.7.18) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 272 bytes |
| コンパイル時間 | 361 ms |
| コンパイル使用メモリ | 7,040 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-04 02:37:33 |
| 合計ジャッジ時間 | 5,456 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 1 WA * 29 |
ソースコード
from string import ascii_lowercase
N = input()
S = ''
p = 0
alp = ascii_lowercase[1:]
while N > 0:
i = 1
while i <= N:
S += 'a'
N -= i
i += 1
if N > 0:
S += alp[p]
p = (p + 1) % 25
N -= 1
print S