随笔分类 -  数论_整数快速幂

摘要:Problem Description Sample Input 2 2 Sample Output 2 Hint 1. For N = 2, S(1) = S(2) = 1. 2. The input file consists of multiple test cases. 解题思路:由于指数很 阅读全文
posted @ 2018-08-06 18:03 霜雪千年 阅读(260) 评论(0) 推荐(0) 编辑
摘要:Problem Description Given a positive integer N, you should output the most right digit of N^N. Input The input contains several test cases. The first 阅读全文
posted @ 2018-08-06 17:57 霜雪千年 阅读(135) 评论(0) 推荐(0) 编辑
摘要:Problem Description 要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。 Input 数据的第一行是一个T,表示有T组数据。每组数据有两个数n(0 <= n < 9973)和B(1 <= B <= 阅读全文
posted @ 2018-03-01 07:47 霜雪千年 阅读(278) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示