結果

問題 No.254 文字列の構成
ユーザー convexineqconvexineq
提出日時 2020-12-11 07:22:13
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 275 bytes
コンパイル時間 169 ms
コンパイル使用メモリ 81,628 KB
実行使用メモリ 70,992 KB
最終ジャッジ日時 2023-10-20 01:18:43
合計ジャッジ時間 3,848 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,384 KB
testcase_01 AC 42 ms
53,384 KB
testcase_02 AC 41 ms
53,384 KB
testcase_03 AC 41 ms
53,384 KB
testcase_04 AC 41 ms
53,384 KB
testcase_05 AC 40 ms
53,384 KB
testcase_06 AC 41 ms
53,384 KB
testcase_07 AC 41 ms
53,384 KB
testcase_08 AC 41 ms
53,384 KB
testcase_09 AC 41 ms
53,384 KB
testcase_10 AC 41 ms
53,384 KB
testcase_11 AC 35 ms
53,384 KB
testcase_12 AC 34 ms
53,384 KB
testcase_13 AC 43 ms
53,384 KB
testcase_14 AC 57 ms
59,772 KB
testcase_15 AC 40 ms
59,860 KB
testcase_16 AC 39 ms
60,232 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 48 ms
70,064 KB
testcase_20 AC 44 ms
64,800 KB
testcase_21 AC 46 ms
68,568 KB
testcase_22 AC 43 ms
63,600 KB
testcase_23 AC 45 ms
67,928 KB
testcase_24 AC 47 ms
65,840 KB
testcase_25 AC 45 ms
68,560 KB
testcase_26 AC 44 ms
65,320 KB
testcase_27 AC 48 ms
70,048 KB
testcase_28 AC 47 ms
69,296 KB
testcase_29 AC 47 ms
69,228 KB
testcase_30 AC 45 ms
67,940 KB
testcase_31 AC 42 ms
63,028 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

ok = 0
ng = n
while ng-ok > 1:
    mid = (ok+ng)//2
    if mid**2 <= n:
        ok = mid
    else:
        ng = mid

ans = []
for i in range(2*ok-1):
    ans.append(97+i%2)
q = n-ok*ok
for i in range(q):
    ans.append(120+i%3)

print("".join(map(chr,ans)))
0