Robô
#include <stdio.h>
int main(void) {
int x=0, y=0, p;
char f;
scanf("%c", &f);
while(f!='S')
{
scanf("%d", &p);
if(f=='C'){
y=y+p;
}
if(f=='B'){
y=y-p;
}
if(f=='D'){
x=x+p;
}
if(f=='E'){
x=x-p;
}
scanf("%c", &f);
}
int d;
d=((x-0)*(x-0))+((y-0)*(y-0));
d=sqrt(d);
printf("%d\n", d);
return 0;
}INFO