随笔分类 -  算法—数论

摘要:题目链接 题目描述: Input: The first line of the input contains two integers nn and mm (1≤n,m≤2⋅105,n⋅m≤2⋅1051≤n,m≤2⋅105,n⋅m≤2⋅105) — the size of the matrix. T 阅读全文
posted @ 2021-04-06 20:52 阿涅—Rachel 阅读(45) 评论(0) 推荐(0)
摘要:题目链接 题目描述: 给定四个正整数a,b,c,k,回答是否存在一个正整数n,使得a*n在k进制表示下的各位的数值之和模b为c。 输入描述: 第一行一个整数T(T <= 5,000)。 接下来T行,每行四个正整数a,b,c,k(1 ≤ a ≤ 10^18; 2 ≤ k ≤ 10^18; 0 ≤ c 阅读全文
posted @ 2021-03-18 20:44 阿涅—Rachel 阅读(79) 评论(0) 推荐(0)