結果
| 問題 | No.501 穴と文字列 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-04-07 22:38:21 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 89 ms / 2,000 ms |
| コード長 | 318 bytes |
| 記録 | |
| コンパイル時間 | 131 ms |
| コンパイル使用メモリ | 77,444 KB |
| 最終ジャッジ日時 | 2025-12-03 23:27:45 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#!/usr/bin/python2
# -*- coding: utf-8 -*-
# †
n, d = map(int, raw_input().split())
v = [0] * n
for loop in xrange(2):
for i in xrange(n):
if d > 0:
v[i] += 1
d -= 1
cand1 = ''.join('CAB'[x] for x in v)
cand2 = cand1[::-1]
res = cand1
if cand1 > cand2:
res = cand2
print res