Tên đăng nhập Điểm ▾ Bài tập Giới thiệu
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0

Hiii I am Nyyngyn

44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001
Furina
Ngô Tấn Khôi
0 0

Hi
= )

44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0
44001 0 0

a=int(input())
for i in range (1,n+1):
print(a)

44001 0 0

include <iostream>

include <fstream>

include <string>

using namespace std;

string rotateLeft(const string &s, int times) {
int n = s.length();
if (n == 0) return s;
times = times % n;
return s.substr(times) + s.substr(0, times);
}

string rotateRight(const string &s, int times) {
int n = s.length();
if (n == 0) return s;
times = times % n;
return s.substr(n - times) + s.substr(0, n - times);
}

int main() {
ifstream infile("ROBOT.INP");
ofstream outfile("ROBOT.OUT");

string S, A;
getline(infile, S);
getline(infile, A);

int count_L = 0, count_R = 0;
for (char c : A) {
    if (c == 'L') count_L++;
    else if (c == 'R') count_R++;
}

int net = count_R - count_L;


string result;
if (net > 0) {
    result = rotateRight(S, net);
} else if (net < 0) {
    result = rotateLeft(S, -net);
} else {
    result = S; 
}


outfile << result << endl;

infile.close();
outfile.close();

return 0;

}

44001 0 0

A developer that wants to create a new project

44001 0 0
44001 0 0