标签:class ... nbsp 距离 font 整数 png log ace
/************************************************************** Problem: 2048 User: shadowland Language: C++ Result: Accepted Time:0 ms Memory:1300 kb ****************************************************************/ #include "bits/stdc++.h" using namespace std ; typedef long long QAQ ; typedef double db ; const db Euler_const = 0.5772156649015328606065120900824024310421593359 ; const db eps = 1e-10 ; int main ( ) { db tmp = 0.0000 , N , M ; cin >> N >> M ; if ( N <= 1e4 ) for ( int i=1 ; i<=N ; ++i ) tmp += ( 1.000 / ( db ) i ) ; else tmp = log ( N + 1.000 ) + Euler_const ; tmp *= ( M * 0.500 ) ; cout << ( QAQ ) ceil ( tmp - 1 ) << endl ; return 0 ; }
2016-10-29 00:56:53
标签:class ... nbsp 距离 font 整数 png log ace
原文地址:http://www.cnblogs.com/shadowland/p/6009800.html