From ec292fa03d3599cb02574cd5a2a217eb5d2cc594 Mon Sep 17 00:00:00 2001 From: Ren Baoshuo Date: Sat, 2 Jan 2021 15:00:59 +0800 Subject: [PATCH] =?UTF-8?q?P2084=20=E8=BF=9B=E5=88=B6=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit R44524974 --- problem/P2084/P2084.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 problem/P2084/P2084.cpp diff --git a/problem/P2084/P2084.cpp b/problem/P2084/P2084.cpp new file mode 100644 index 00000000..3f04aa5e --- /dev/null +++ b/problem/P2084/P2084.cpp @@ -0,0 +1,21 @@ +#include + +using namespace std; + +int m; +string s; + +int main() { + cin >> m >> s; + for (int i = 0; i < s.size(); i++) { + if(s[i] == '0') { + continue; + } + if (i != 0) { + cout << '+'; + } + cout << s[i] << '*' << m << '^' << s.size() - i - 1; + } + cout << endl; + return 0; +} \ No newline at end of file