作业帮 > 英语 > 作业

Problem Description Given a positive integer N,y

来源:学生作业帮 编辑:大师作文网作业帮 分类:英语作业 时间:2024/11/10 21:37:52
Problem Description Given a positive integer N,y
Problem Description
Given a positive integer N,you should output the leftmost digit of N^N.
Input
The input contains several test cases.The first line of the input is a single integer T which is the number of test cases.T test cases follow.
Each test case contains a single positive integer N(1
Problem Description Given a positive integer N,y
大概的意思就是输入整形n,带入x的表达式求出x,再调用函数floor(x)以及pow函数求出最高位数字a,最后输出a的值
再问: 那为什么要先求x=n*log(10)n,再求a=pow(10,x-floor(x))?
我有点疑惑,这样有什么意义?