/ Vijos / 讨论 / 膜拜 /

求大神解释:费马小定理出错了?

测试数据 #0: Accepted, time = 0 ms, mem = 2128 KiB, score = 9
测试数据 #1: Accepted, time = 0 ms, mem = 2132 KiB, score = 9
测试数据 #2: Accepted, time = 187 ms, mem = 2120 KiB, score = 9
测试数据 #3: Accepted, time = 218 ms, mem = 2128 KiB, score = 9
测试数据 #4: Accepted, time = 0 ms, mem = 2128 KiB, score = 9
测试数据 #5: Accepted, time = 0 ms, mem = 2124 KiB, score = 9
测试数据 #6: Accepted, time = 93 ms, mem = 2128 KiB, score = 9
测试数据 #7: Accepted, time = 0 ms, mem = 2128 KiB, score = 9
测试数据 #8: Accepted, time = 15 ms, mem = 2132 KiB, score = 9
测试数据 #9: Accepted, time = 109 ms, mem = 2124 KiB, score = 9
测试数据 #10: Accepted, time = 15 ms, mem = 2128 KiB, score = 10
Accepted, time = 637 ms, mem = 2132 KiB, score = 100;
疑问:
令t=大神排列数。
根据费马小定理,应该令t%=1000000006;cout<<2^t%1000000007;
但是只能过3组,而令t对1000000007取余却AC了。

0 条评论

目前还没有评论...

信息

ID
1644
难度
7
分类
动态规划 | 其他 | 快速幂 点击显示
标签
递交数
711
已通过
143
通过率
20%
被复制
4
上传者