結果

問題 No.2030 Googol Strings
ユーザー とりゐとりゐ
提出日時 2022-07-02 19:33:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 232 ms / 2,000 ms
コード長 310 bytes
コンパイル時間 435 ms
コンパイル使用メモリ 82,404 KB
実行使用メモリ 456,992 KB
最終ジャッジ日時 2024-12-17 15:06:41
合計ジャッジ時間 4,130 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
  x=input()
  y=input()
  if x+y==y+x:
    if x<y:print('Y')
    else:print('X')
    return
  cx=0
  while cx*len(x)<len(y):
    cx+=1
  cy=0
  while cy*len(y)<len(x):
    cy+=1
  xx=x*(cx+1)*100
  yy=y*(cy+1)*100
  if xx<yy:print('Y')
  else:print('X')
  

for _ in range(int(input())):
  solve()
0