Make Unreal REAL.
article thumbnail
Level 0. 수 조작하기 2

 

 

#include <iostream>
#include <vector>

using namespace std;

string solution(vector<int> numLog)
{
    size_t n = numLog.size() - 1;
    string answer(n, '\0');
    const char* wasd = "d        w s        a";

    for (int i = 0; i < n; ++i)
        answer[i] = wasd[numLog[i] - numLog[i + 1] + 10];

    return answer;
}
profile

Make Unreal REAL.

@diesuki4

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!

검색 태그