编程题
你有我备注吗
这个作者很懒,什么都没留下…
展开
-
计算十进制数的二进制形式有几个1(C语言)
这个方法不用进行进制的转换,而是直接计算1的个数 #include<stdio.h> #include<math.h> #define L 5000 long int d(int num); int cal(int num); //int a(int num); void wo(int num); int main(){ int num; ...原创 2019-06-03 09:55:43 · 1510 阅读 · 0 评论 -
7. Reverse Integer(python3实现)
Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Output: -321 Example 3: Input: 120 Output: 21 Note: Assume we are dealing with an ...原创 2019-06-02 16:54:29 · 315 阅读 · 0 评论 -
1. Two Sum(python3实现)
问题描述: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the ...原创 2019-06-02 15:51:25 · 704 阅读 · 0 评论