結果
| 問題 | No.501 穴と文字列 |
| コンテスト | |
| ユーザー |
r_ishida
|
| 提出日時 | 2026-01-10 12:24:13 |
| 言語 | Python3 (3.14.2 + numpy 2.4.0 + scipy 1.16.3) |
| 結果 |
AC
|
| 実行時間 | 154 ms / 2,000 ms |
| コード長 | 440 bytes |
| 記録 | |
| コンパイル時間 | 680 ms |
| コンパイル使用メモリ | 20,804 KB |
| 実行使用メモリ | 15,488 KB |
| 最終ジャッジ日時 | 2026-01-10 12:24:18 |
| 合計ジャッジ時間 | 5,506 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
import math
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
n, d = MI()
if n > d:
print('A'*d + 'C'*(n-d))
elif n == d:
print('A'*n)
else:
print('A'*(2*n-d) + 'B'*(d-n))
r_ishida