题目: 题解:
class Solution:def readBinaryWatch(self, turnedOn: int) -> List[str]:ans list()for i in range(1024):h, m i >> 6, i & 0x3f # 用位运算取出高 4 位和低 6 位if h < 12 and m < 60 and bin(i).count("1&…
1.费马小定理
#include<bits/stdc.h>
using namespace std;
#define int long long
int ksm(int x,int y,int p){int ans1;while(y){if(y&1) ansans*x%p;xx*x%p;y>>1;}return ans;
}
signed main()
{//求 n 在 p 下的逆元,p 必须是质数int n,p;ci…