我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

Leftmost Digit 解决的办法

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<=N<=1,000,000,000).

Output
For each test case, you should output the leftmost digit of N^N.

Sample Input
2
3
4

Sample Output
2
2

近期文章

  • Last non-zero Digit in N! 编程的手段
  • I Think I Need a Houseboat 的实现
  • mybatis 无法找到Mapper.xml
  • To The Max 是怎么做的呢
  • Human Gene Functions 的编程的代码
  • What Is Your Grade?
  • python3.7 \r 光标不能返回到前面覆盖
  • Holding Bin-Laden Captive!
  • Doing Homework C语言
  • A hard puzzle 是怎么来写得
  • What Are You Talking About 程序编写技术
  • Lottery 的实现
  • Color a Tree 代码实现的方式
  • HangOver 如何正确的编写
  • 会脚本的大神帮个忙~~~
  • ASCII码排序 程序编写实现
  • 求平均成绩 不太会用C语言作
  • python字典的值为字母,怎样变成整数使其一一对应关系
  • 为什么鼠标移出事件会在标签的文字上触发??怎么解决这个问题??
  • 使用str_replace进行简单模板化

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华