結果

問題 No.2030 Googol Strings
ユーザー とりゐとりゐ
提出日時 2022-07-02 19:33:24
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 387 ms / 2,000 ms
コード長 310 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 86,928 KB
実行使用メモリ 466,280 KB
最終ジャッジ日時 2023-08-22 15:32:40
合計ジャッジ時間 5,147 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 191 ms
79,464 KB
testcase_01 AC 245 ms
253,388 KB
testcase_02 AC 150 ms
250,704 KB
testcase_03 AC 70 ms
71,568 KB
testcase_04 AC 180 ms
77,932 KB
testcase_05 AC 202 ms
253,524 KB
testcase_06 AC 283 ms
417,532 KB
testcase_07 AC 387 ms
465,824 KB
testcase_08 AC 359 ms
466,280 KB
testcase_09 AC 76 ms
71,216 KB
testcase_10 AC 79 ms
71,428 KB
testcase_11 AC 76 ms
71,340 KB
testcase_12 AC 203 ms
78,140 KB
testcase_13 AC 260 ms
129,532 KB
testcase_14 AC 258 ms
254,596 KB
testcase_15 AC 247 ms
252,740 KB
testcase_16 AC 220 ms
250,636 KB
権限があれば一括ダウンロードができます

ソースコード

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