結果
| 問題 |
No.254 文字列の構成
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-07-25 00:05:52 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 298 bytes |
| コンパイル時間 | 91 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-16 02:16:43 |
| 合計ジャッジ時間 | 5,898 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 30 |
ソースコード
As = 'abcdefghijklmnopqrstuvwxyz'
def solve(N, As):
if N == 0:
return ''
if N == 1:
return As[0]
m = int(N**0.5) + 1
while m * (m+1) > N:
m -= 1
n = N - m * (m + 1)
return As[0:2] * m + solve(n, As[2:])
N = int(input())
print(len(solve(N, As)))