eolymp
bolt
Try our new interface for solving problems
Problems

Slicing 3

published at 1/8/20, 8:41:15 am

Добавте пропуски по сторонам строки и тогда индексация будет с 1

published at 1/29/20, 6:49:31 pm

Умова задачі не відповідає тестам. Якщо бути точним то це 5 операція(Слово, що утворюють усі символи з парними індексами). У прикладі тесту на виході отримуемо стрічку утворену елементами з непарними(це є коректним для тестів). Ще одним неприємним моментом особисто для мене стала різниця між тим як зчитуеться стрічка. Якщо зчитувати до першого пробілу, переходу на новій рядок,... всі тести проходять. Якщо зчитати рядок повністю до кінця вхідних данних проходить лише один тест. На мою думку це не є коректно тому, що в умові вказано саме рядок

published at 6/27/20, 10:10:03 am

Instead of "All characters of the string s through one in the reverse order, starting with the last."

it should be "All odd characters of the string s through one in the reverse order, starting with the last."

published at 5/27/21, 9:50:12 am

What is the problem ? #9045225

published at 5/28/22, 12:21:30 pm

Bu hell niye 80 verir

published at 1/2/24, 10:29:37 pm

include <stdio.h>

include <string.h>

int main(){ char n[10000]; gets(n); int size=strlen(n);

printf("%c%c%c\n",n[1],n[3],n[9]);
printf("%c%c%c\n",n[0],n[1],n[size-1]);

int k=size-5;
for(int i=k ;i<size ;i++){
    printf("%c",n[i]);
}
printf("\n");

int f=size-4;
for(int i=0 ;i<f ;i++){
    printf("%c",n[i]);
}
printf("\n");

int s=0;
for(int i=0 ;i<size ;i++){
    if(i%2==0){
        printf("%c",n[i]);
        s++;
    }
}
printf("\n");

printf("%d\n",s);

while(size>0){
    printf("%c",n[size-1]);
    size-=2;
}

}

published at 2/28/24, 2:08:38 pm

n=input() p=n[::-1] g=p[0::2] o=n[0::2] k=len(n)-1 print(n[1]+n[3]+n[9]) print(n[0]+n[1]+n[-1]) print(n[-5:-1]+n[-1]) print(n[0:k-3]) print(o) print(len(o)) print(g)