Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

#Python 2, (削除) 81 (削除ここまで) 72 bytes

Python 2, (削除) 81 (削除ここまで) 72 bytes

a,b=sorted(input(),key=len)
for c in a:b=b.replace(c,"",1)
print a+"_"+b

Try it online

#Python 2, (削除) 81 (削除ここまで) 72 bytes

a,b=sorted(input(),key=len)
for c in a:b=b.replace(c,"",1)
print a+"_"+b

Try it online

Python 2, (削除) 81 (削除ここまで) 72 bytes

a,b=sorted(input(),key=len)
for c in a:b=b.replace(c,"",1)
print a+"_"+b

Try it online

deleted 4 characters in body
Source Link
mbomb007
  • 23.6k
  • 7
  • 66
  • 143

#Python 2, 81(削除) 81 (削除ここまで) 72 bytes

a,b=input()
if lenb=sorted(b)<leninput(a):a,b=b,akey=len)
for c in a:b=b.replace(c,"",1)
print a+"_"+b

Try it online Try it online

#Python 2, 81 bytes

a,b=input()
if len(b)<len(a):a,b=b,a
for c in a:b=b.replace(c,"",1)
print a+"_"+b

Try it online

#Python 2, (削除) 81 (削除ここまで) 72 bytes

a,b=sorted(input(),key=len)
for c in a:b=b.replace(c,"",1)
print a+"_"+b

Try it online

Source Link
mbomb007
  • 23.6k
  • 7
  • 66
  • 143

#Python 2, 81 bytes

a,b=input()
if len(b)<len(a):a,b=b,a
for c in a:b=b.replace(c,"",1)
print a+"_"+b

Try it online

AltStyle によって変換されたページ (->オリジナル) /