// // 428.cpp // yukicoder // // Created by KITAZUMI on 2016/11/07. // Copyright © 2016年 KITAZUMI. All rights reserved. // //#include "428.hpp" #include #include #include using namespace std; int main(){ long D[19]; int N; long S[19]; long A; long tmp; long keta; D[0] = 1234567891; D[1] = 111213141; D[2] = 5161718192; D[3] = 212223242; D[4] = 5262728293; D[5] = 313233343; D[6] = 5363738394; D[7] = 414243444; D[8] = 5464748495; D[9] = 515253545; D[10] = 5565758596; D[11] = 616263646; D[12] = 5666768697; D[13] = 717273747; D[14] = 5767778798; D[15] = 818283848; D[16] = 5868788899; D[17] = 919293949; D[18] = 5969798991; cin >> N; //S = D*N; A = 0; keta = pow(10, 10); for(int i = 18; i >= 0; i--){ tmp = D[i] * N; S[i] = tmp % keta + A; A = tmp / keta; } cout << A << "."; for(int i = 0; i < 19; i++){ cout << setfill('0') << setw(10) << S[i]; } cout << endl; return 0; }