#include //#include //#include //#include #define rep(i, a) for (int i = (int)0; i < (int)a; ++i) #define rrep(i, a) for (int i = (int)a - 1; i >= 0; --i) #define REP(i, a, b) for (int i = (int)a; i < (int)b; ++i) #define RREP(i, a, b) for (int i = (int)a - 1; i >= b; --i) #define pb push_back #define eb emplace_back #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define popcount __builtin_popcount using ll = long long; constexpr ll mod = 1e9 + 7; constexpr ll INF = 1LL << 60; // #pragma GCC target("avx2") // #pragma GCC optimize("O3") // #pragma GCC optimize("unroll-loops") //using lll=boost::multiprecision::cpp_int; //using Double=boost::multiprecision::number>;//仮数部が1024桁 template inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template T mypow(T x, T n, const T &p = -1) { //x^nをmodで割った余り if(p!=-1){ x%=p; } T ret = 1; while (n > 0) { if (n & 1) { if (p != -1) ret = (ret * x) % p; else ret *= x; } if (p != -1) x = (x * x) % p; else x *= x; n >>= 1; } return ret; } using namespace std; //using namespace atcoder; void solve() { string d="0.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991"; int n; cin>>n; if(n<10){ int c=0; for(int i=d.size()-1;i>=0;--i){ if(d[i]=='.')continue; int val=(d[i]-'0')*n; val+=c; d[i]=char('0'+val%10); c=val/10; } } else if(n==10){ d.erase(d.begin()); d.erase(d.begin()); d.insert(d.begin()+1,'.'); } else if(n==100){ d.erase(d.begin()); d.erase(d.begin()); d.insert(d.begin()+2,'.'); } else if(n!=1){ int c=0; string dd=d; for(int i=d.size()-1;i>=0;--i){ if(d[i]=='.')continue; int val=(d[i]-'0')*(n%10); val+=c; d[i]=char('0'+val%10); c=val/10; } dd.erase(dd.begin()); dd.erase(dd.begin()); dd.insert(dd.begin()+1,'.'); c=0; for(int i=dd.size()-1;i>=0;--i){ if(dd[i]=='.')continue; int val=(dd[i]-'0')*(n/10); val+=c; dd[i]=char('0'+val%10); c=val/10; } cout<=0){ char a=d[pos],b=dd[pos]; if(a=='.'){ --pos; x+='.'; a=d[pos],b=dd[pos]; } --pos; int val=(a-'0')+(b-'0')+c; c=val/10; x+=char('0'+val%10); } reverse(all(x)); d=x; } cout<