1.非递归的解法
#include <iostream>
using namespace std;
int main(){int a,b,c,t1;cin>>a>>b>>c;if(a>2&&a<1e3&&b>0&&a<1e7&&c>2&&c<1e5)for(int i0;i<b;i)tt*a%c;cout<<t;r…
题目: Verilog has a ternary conditional operator ( ? : ) much like C:
(condition ? if_true : if_false)
This can be used to choose one of two values based on condition (a mux!) on one line, without using an if-then inside a combinational alwa…