标签:
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 14954 Accepted Submission(s): 5775
#include<queue> #include<math.h> #include<stdio.h> #include<string.h> #include<string> #include<iostream> #include<algorithm> using namespace std; int main() { int T;cin>>T; while(T--) { double n; cin>>n; double m=n*log10(n); double p=m-(long long)m; double q=pow(10,p); cout<<(long long)q<<endl; } return 0; }
HDU 1060 Leftmost Digit (数学/大数)
标签:
原文地址:http://www.cnblogs.com/wmxl/p/4780457.html