- 博客(11)
- 资源 (1)
- 收藏
- 关注
原创 python两天半
import mathnum=1while True: if math.sqrt(num+100)-int(math.sqrt(num+100))==0 and math.sqrt(num+268)-int(math.sqrt(num+268))==0: print(num) break num +=1
2018-01-18 13:08:16
251
原创 python两天半01
第一个半天:# -*- coding: UTF-8 -*-print 'Hello World!'#有1,2,3,4个数字,能组成多少个互不相同且无重复数字的三位数,都是多少cnt=0;for i in range(1,5): for j in range(1,5): for k in range(1,5): if i!=j and i!=k and j!=k: print i*100
2018-01-18 13:01:52
242
原创 LeetCode 刷题
题目:T he gray code is binary numeral system where two successive values differ in only one bit.Given a non-negative interger n representing the total number of bits in the code,print the sequence o
2018-01-17 11:09:20
173
原创 算法 发工资
//人家用向量做的,我就暴力破解吧//发工资不用找零 #include using namespace std;int judge(int money){ int sum_100=0; int sum_50=0; int sum_20=0; int sum_10=0; int sum_5=0; int sum_2=0; int sum_1=0;//初
2018-01-16 17:43:16
626
原创 马拉松 算法 做卷子那道题
#include #include #include #incldue using namespace std;//做卷子 //家庭作业 struct Homework{ int num; int value; double average; bool operator { return (average }};int main(
2018-01-16 17:09:45
281
原创 编程强势糖果
#include #include using namespace std;int main(){string nowcoder,brother;while (cin>>nowcoder>>brother){if(nowcoder.length() { cout return 0; } int hashTable [26]={0}; fo
2018-01-16 16:44:11
309
原创 算法题------分遗产
//代码注释#includeusing namespacestd;int LCM(int num1,int num2){ int x,y; if(num1 num1^=num2;num2^=num1;num1^=num2; } x=num1;y=num2; while(y!=0) {int temp=x
2018-01-15 17:03:29
765
原创 编程马拉松 算法题
/ write your code here cpp#includeusingnamespace std;int LCM(int num1,int num2){ int x,y; if(num1 num1^=num2;num2^=num1;num1^=num2; } x=num1;y=num2;
2018-01-15 16:11:55
593
转载 LeetCode|Reverse Words in a String
题目: Given an input string ,reverse the string word by word .For example , Given s=”the sky is blue ‘, return “blue is sky the “. 思路: 方法1:首先把句子看成由词组成的,例如,A B C ,因此可以将句子的所有字符前后交换,得到 C B A,显然X表示逆序的词
2018-01-03 23:28:32
168
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅