๋ฌธ์
์ฝ๋
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
vector<int> solution(long long n) {
vector<int> answer;
string s;
s=to_string(n);
reverse(s.begin(),s.end());
for(int i=0; i<s.length(); i++){
long long inp=s[i]-'0';
answer.push_back(inp);
}
return answer;
}
'Algorithm ๐ง๐ปโ๐ป > ํ๋ก๊ทธ๋๋จธ์ค(Programmers)' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[c++] ํ๋ก๊ทธ๋๋จธ์ค - ์ฒด์ก๋ณต( Level 1) (0) | 2021.10.22 |
---|---|
[c++] ํ๋ก๊ทธ๋๋จธ์ค - ์ง์ง์ด ์ ๊ฑฐํ๊ธฐ( Level 2) (0) | 2021.10.22 |
[c++] ํ๋ก๊ทธ๋๋จธ์ค - ์ ํ๋ฒํธ ๋ชฉ๋ก( Level 2) (0) | 2021.10.22 |
[c++] ํ๋ก๊ทธ๋๋จธ์ค - ์ด์ค ์ฐ์ ์์ํ( Level 3) (0) | 2021.10.22 |
[c++] ํ๋ก๊ทธ๋๋จธ์ค - ์ด์ํ ๋ฌธ์ ๋ง๋ค๊ธฐ( Level 1) (0) | 2021.10.22 |
[c++] ํ๋ก๊ทธ๋๋จธ์ค - ์์ ๋ํ๊ธฐ( Level 1) (0) | 2021.10.22 |
๋๊ธ