Python 3, (削除) 198 (削除ここまで) (削除) 196 (削除ここまで) 194192 bytes
- Saved 46 bytes: thanks to Zachary T :
if(m and n)to if m and n & removed unwanted r for regex string, index i starting from 1 instead of 0
I don't know why, but it isn't working on TIO somehow! Working on python 3.6 on PC though!
from re import*
s=search
a=input().split()
v="[aeiouy]+"
j=1
while j<len(a):
i=j-1;m=s(v,a[j]);n=s(v,a[i])
if m and n:a[i]=sub(v,m[0],a[i],1);a[j]=sub(v,n[0],a[j],1)
j+=2
print(' '.join(a))
Python 3, (削除) 198 (削除ここまで) (削除) 196 (削除ここまで) 194 bytes
- Saved 4 bytes: thanks to Zachary T :
if(m and n)to if m and n & removed unwanted r for regex string, index i starting from 1 instead of 0
I don't know why, but it isn't working on TIO somehow! Working on python 3.6 on PC though!
from re import*
s=search
a=input().split()
v="[aeiouy]+"
j=1
while j<len(a):
i=j-1;m=s(v,a[j]);n=s(v,a[i])
if m and n:a[i]=sub(v,m[0],a[i],1);a[j]=sub(v,n[0],a[j],1)
j+=2
print(' '.join(a))
Python 3, (削除) 198 (削除ここまで) (削除) 196 (削除ここまで) 192 bytes
- Saved 6 bytes: thanks to Zachary T :
if(m and n)to if m and n & removed unwanted r for regex string, index i starting from 1 instead of 0
from re import*
s=search
a=input().split()
v="[aeiouy]+"
j=1
while j<len(a):
i=j-1;m=s(v,a[j]);n=s(v,a[i])
if m and n:a[i]=sub(v,m[0],a[i],1);a[j]=sub(v,n[0],a[j],1)
j+=2
print(' '.join(a))
Python 3, (削除) 198 (削除ここまで) 196(削除) 196 (削除ここまで) 194 bytes
- Saved 24 bytes: thanks to Zachary T :
if(m and n)to if m and n & removed unwanted r for regex string, index i starting from 1 instead of 0
I don't know why, but it isn't working on TIO somehow! Working on python 3.6 on PC though!
from re import*
s=search
a=input().split()
v="[aeiouy]+"
i=0j=1
while i+1<lenj<len(a):
j=i+1;m=si=j-1;m=s(v,a[j]);n=s(v,a[i])
if m and n:a[i]=sub(v,m[0],a[i],1);a[j]=sub(v,n[0],a[j],1)
i+=2j+=2
print(' '.join(a))
Python 3, (削除) 198 (削除ここまで) 196 bytes
- Saved 2 bytes: thanks to Zachary T :
if(m and n)to if m and n & removed unwanted r for regex string
I don't know why, but it isn't working on TIO somehow! Working on python 3.6 on PC though!
from re import*
s=search
a=input().split()
v="[aeiouy]+"
i=0
while i+1<len(a):
j=i+1;m=s(v,a[j]);n=s(v,a[i])
if m and n:a[i]=sub(v,m[0],a[i],1);a[j]=sub(v,n[0],a[j],1)
i+=2
print(' '.join(a))
Python 3, (削除) 198 (削除ここまで) (削除) 196 (削除ここまで) 194 bytes
- Saved 4 bytes: thanks to Zachary T :
if(m and n)to if m and n & removed unwanted r for regex string, index i starting from 1 instead of 0
I don't know why, but it isn't working on TIO somehow! Working on python 3.6 on PC though!
from re import*
s=search
a=input().split()
v="[aeiouy]+"
j=1
while j<len(a):
i=j-1;m=s(v,a[j]);n=s(v,a[i])
if m and n:a[i]=sub(v,m[0],a[i],1);a[j]=sub(v,n[0],a[j],1)
j+=2
print(' '.join(a))