#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include "bits/stdc++.h" #define REP(i,a,b) for(int i=a;i> N; int rest = 0; reverse(ALL(d)); int mode = 0; rep(i, 540) { int v = 0; if (mode == 0) { if (d[i] == '.') { mode = 1; res += "."; continue; } v = d[i] - '0'; } else { if (rest == 0) { break; } } res += (v * N + rest) % 10 + '0'; rest = (v * N + rest) / 10; } if (res.back() == '.') res += '0'; reverse(ALL(res)); cout << res << endl; return 0; }