//サンプルが大ヒント #include using namespace std; int a[6] = {1, 4, 2, 8, 5, 7}; int n; int main() { cin >> n; cout << "0"; if (n == 0) return 0; cout << "."; for (int i = 0; i < n; i++) { cout << a[i % 6]; } cout << endl; return 0; }