C1:
int sontcuoi=-1;
for (int i=0;i<n;i++)
if ktnt(a[i])==1)
sontcuoi=a[i];
return sontcuoi;
C2:
for (int i=0;i<n;i++)
if ktnt(a[n-i])==1)
return a[i];
return -1;
Last modified on November 20th, 2023 at 3:34 am
Nam Le
lequocnam
0 responds