#pragma GCC optimize ( "O3" ) #pragma GCC optimize( "unroll-loops" ) #pragma GCC target ( "sse4.2,fma,avx2,popcnt,lzcnt,bmi2" ) #include using namespace std; #define UNTIE ios_base::sync_with_stdio( false ); cin.tie( nullptr ) #define TYPE_OF( VAR ) decay_t #define CEXPR( LL , BOUND , VALUE ) constexpr LL BOUND = VALUE #define CIN( LL , A ) LL A; cin >> A #define ASSERT( A , MIN , MAX ) assert( MIN <= A && A <= MAX ) #define CIN_ASSERT( A , MIN , MAX ) CIN( TYPE_OF( MAX ) , A ); ASSERT( A , MIN , MAX ) #define QUIT return 0 #define COUT( ANSWER ) cout << ( ANSWER ) << "\n" #define RETURN( ANSWER ) COUT( ANSWER ); QUIT int main() { CEXPR( int , bound , 20 ); CIN_ASSERT( N , - bound , bound ); string answer[bound+1] = { "1/10" , "-1/100" , "-9/1000" , "19/10000" , "71/100000" , "-261/1000000" , "-449/10000000" , "3059/100000000" , "1431/1000000000" , "-32021/10000000000" , "17711/100000000000" , "302499/1000000000000" , "-479609/10000000000000" , "-2545381/100000000000000" , "7341471/1000000000000000" , "18112339/10000000000000000" , "-91527049/100000000000000000" , "-89596341/1000000000000000000" , "1004866831/10000000000000000000" , "-108903421/100000000000000000000" , "-9939764889/1000000000000000000000" }; RETURN( N > 0 ? "0/1" : answer[-N] ); }