結果
問題 |
No.2947 Sing a Song
|
ユーザー |
|
提出日時 | 2024-10-25 22:18:20 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 282 bytes |
コンパイル時間 | 343 ms |
コンパイル使用メモリ | 82,776 KB |
実行使用メモリ | 67,004 KB |
最終ジャッジ日時 | 2024-10-25 22:18:33 |
合計ジャッジ時間 | 4,589 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 25 |
ソースコード
import sympy import math n=int(input()) S,T=input().split() s=len(S);t=len(T) v=math.gcd(s,t) s//=v;t//=v u=math.lcm(s,t) a=list(map(int,input().split())) x,y,d=list(sympy.gcdex(s,t)) for i in range(n): a[i]//=v X=x*a[i];Y=y*a[i] w=Y//s Y%=s X+=w*t print((S+' ')*X+(T+' ')*Y)