17028djwcb
- 游戏开发
- 2025-09-14 14:15:01

17028djwcb
⭐️难度:中等 🌟考点:思维、高精度 📖
📚
import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); BigInteger k = new BigInteger("10"); while(t-->0){ BigInteger x = new BigInteger(sc.next()); BigInteger p = new BigInteger(sc.next()); System.out.println(x.modPow(p, k)); } } }直接通过BigInteger的快速快速幂取模modPow
17028djwcb由讯客互联游戏开发栏目发布,感谢您对讯客互联的认可,以及对我们原创作品以及文章的青睐,非常欢迎各位朋友分享到个人网站或者朋友圈,但转载请说明文章出处“17028djwcb”