随笔分类 -  算法-数论 / 数论之同余方程

摘要:求关于 x 的同余方程 ax ≡ 1 (mod b) 的最小正整数解。 输入描述 输入只有一行,包含两个正整数 a,b,用一个空格隔开。 对于40%的数据,2<=b<=1,000; 对于60%的数据,2<=b<=50,000,000; 对于100%的数据,2<=a,b<=2,000,000,000。 阅读全文
posted @ 2024-12-04 09:36 lipu123
摘要:Among the strings of length A+B containing A occurrences of a and B occurrences of b, find the string that comes K-th in the lexicographical order.Con 阅读全文
posted @ 2021-07-24 12:17 lipu123 阅读(158) 评论(0) 推荐(0)