// yukicoder: No.746 7の倍数 // 2019.4.21 bal4u #include #if 1 #define gc() getchar_unlocked() #define pc(c) putchar_unlocked(c) #else #define gc() getchar() #define pc(c) putchar(c) #endif int in() // 非負整数の入力 { int n = 0, c = gc(); do n = 10 * n + (c & 0xf), c = gc(); while (c >= '0'); return n; } void outs(char *s) { while (*s) pc(*s++); } char s[] = "142857", *p = s; int main() { int N, k; N = in(); pc('0'); if (N > 0) { pc('.'); k = N/6; while (k--) outs(s); k = N%6; while (k--) pc(*p++); } pc('\n'); return 0; }