题目链接:https://cn.vjudge.net/problem/UVA-11582 /* 问题 输入a,b,n(0<a,b<2^64(a and bwill not both be zero) and 1<n<1000) 计算并输出f(a^b)%n的结果 其中f(i)是斐波那契数列 解题思路 所有的结果都是f(i)对n取模,不妨设F(i)=f(i)%n.不难发现当F(i),F(i+1)出现重复的时候,整个序列就开始出现重复. 所以设周期为mod,计算出一个循环周期F(0)~f…
Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplication, exponentiation by a non-negative integer is defin…