标签:white cep ssi dash several pop accept osi other
2 3 4
2 2HintIn the first case, 3 * 3 * 3 = 27, so the leftmost digit is 2. In the second case, 4 * 4 * 4 * 4 = 256, so the leftmost digit is 2.
#include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <algorithm> using namespace std; int main() { int t; cin >> t; while (t--) { long long int num; cin >> num; double num1 = num * log10( double (num)); long long int num2 = (long long int) num1; double num3 = num1 - num2; num = (long long int) pow(10,num3); cout << num<< endl; } return 0; }
标签:white cep ssi dash several pop accept osi other
原文地址:http://www.cnblogs.com/tlnshuju/p/7093833.html