結果
| 問題 | No.501 穴と文字列 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-04-07 22:38:21 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
AC
|
| 実行時間 | 57 ms / 2,000 ms |
| + 399µs | |
| コード長 | 318 bytes |
| 記録 | |
| コンパイル時間 | 55 ms |
| コンパイル使用メモリ | 80,468 KB |
| 実行使用メモリ | 85,336 KB |
| 最終ジャッジ日時 | 2026-07-18 12:39:00 |
| 合計ジャッジ時間 | 2,780 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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