結果
問題 |
No.2947 Sing a Song
|
ユーザー |
|
提出日時 | 2024-10-25 22:03:40 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 294 bytes |
コンパイル時間 | 183 ms |
コンパイル使用メモリ | 82,400 KB |
実行使用メモリ | 1,252,564 KB |
最終ジャッジ日時 | 2024-10-25 22:04:30 |
合計ジャッジ時間 | 6,815 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | MLE * 1 -- * 2 |
other | -- * 25 |
ソースコード
def gcd(a,b): if b==0: return a else: return gcd(b,a%b) N=int(input()) S,T=list(map(str,input().split())) A=list(map(int,input().split())) s=len(S) t=len(S) for i in range(N): m=A[i] ans=[] while m%len(S)!=0: ans.append(T) m-=t while m>0: ans.append(S) m-=s print(*ans)