結果
問題 | No.2947 Sing a Song |
ユーザー |
![]() |
提出日時 | 2024-10-25 21:26:37 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 102 ms / 2,000 ms |
コード長 | 353 bytes |
コンパイル時間 | 147 ms |
コンパイル使用メモリ | 82,768 KB |
実行使用メモリ | 82,240 KB |
最終ジャッジ日時 | 2024-10-25 21:26:49 |
合計ジャッジ時間 | 4,753 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
ソースコード
N=int(input()) S,T=input().split() A=list(map(int,input().split())) v=[0]*(3*10**5) a=len(S) b=len(T) result=[] for i in range(N): result=[] x=A[i] z=0 for y in range(x+1): if y*a>x: break if (x-y*a)%b==0: z=y w=(x-z*a)//b for j in range(z): result.append(S) for j in range(w): result.append(T) print(*result)