摘要: 可以用_gcd(a, b)函数 求a与b的最大公约数 阅读全文
posted @ 2019-09-26 20:47 慌的一批 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 题意: 大概就是给你一串二进制的数,然后让你求log(4)s吧,刚开始找错方向,先把它转成十进制,结果数太大 解决方法: 大概是分析这个数如果正好是4的幂次方的话在二进制的表示里应该只有一个1,所以分析数的长度就可以 阅读全文
posted @ 2019-09-16 19:01 慌的一批 阅读(165) 评论(0) 推荐(0) 编辑
摘要: You are given two strings ss and tt both of length 22 and both consisting only of characters 'a', 'b' and 'c'. Possible examples of strings ss and tt 阅读全文
posted @ 2019-09-08 21:46 慌的一批 阅读(247) 评论(0) 推荐(0) 编辑
摘要: The only difference between easy and hard versions is the number of elements in the array. You are given an array aa consisting of nn integers. In one 阅读全文
posted @ 2019-09-08 18:44 慌的一批 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 题目描述 已知 nnn 个整数 x1,x2,…,xnx_1,x_2,…,x_nx1​,x2​,…,xn​,以及111个整数kkk(k<nk<nk<n)。从nnn个整数中任选kkk个整数相加,可分别得到一系列的和。例如当n=4,k=3n=4,k=3n=4,k=3,444个整数分别为3,7,12,193 阅读全文
posted @ 2019-07-05 22:29 慌的一批 阅读(170) 评论(0) 推荐(0) 编辑