上一页 1 2 3 4 5 6 7 ··· 16 下一页
摘要: 1 import requests 2 url = 'http://www.wechall.net/challenge/training/programming1/index.php?action=request' 3 cookie = dict(WC='*****************') 4 阅读全文
posted @ 2020-06-22 17:19 TTTCoder 阅读(1704) 评论(0) 推荐(1) 编辑
摘要: 1 #include<iostream> 2 #include<cstring> 3 #include<string> 4 using namespace std; 5 int main() 6 { 7 char str1[256],str2[256]; 8 int a[256],b[256],c[ 阅读全文
posted @ 2020-05-06 16:46 TTTCoder 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 用高精度方法,求s=1+2+3+.....+n的精度值(n以一般整数输入,n<=10^100) 1 #include<iostream> 2 #include<cstring> 3 #include<string> 4 using namespace std; 5 int main() 6 { 7 阅读全文
posted @ 2020-05-06 16:43 TTTCoder 阅读(1416) 评论(0) 推荐(0) 编辑
摘要: (一)简单的测试——在程序投入生产之前,这种测试是质量保证的最低限度 牛顿迭代法求算术平方根: 1 def my_sqrt(x): 2 approx = None 3 guess = x / 2 4 while approx != guess: 5 print("approx =", approx) 阅读全文
posted @ 2020-03-20 00:36 TTTCoder 阅读(348) 评论(0) 推荐(0) 编辑
摘要: 描述 求两个实数相加的和。 题目中输入输出里出现的浮点数都有如下的形式:P1P2...Pi.Q1Q2...Qj。对于整数部分,P1P2...Pi是一个非负整数且当整数部分不为0时,P1不等于0;对于小数部分,Qj不等于0。 输入2行,每行是一个加数。每个加数的长度不超过100。输出一行,即相应的和。 阅读全文
posted @ 2019-12-23 18:51 TTTCoder 阅读(861) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> //简单快捷包括所有头文件,推荐使用 using namespace std; int n; int x[200010],y[200010],s[200010]; bool f(double w){ long double sum = 0; for(int i = 0; i < n; i++){ sum += s[i]/w; if(sum > y[ 阅读全文
posted @ 2019-11-26 20:37 TTTCoder 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 1 #!/usr/bin/env python3 2 import requests 3 4 def download(url): 5 try: 6 req = requests.get(url) 7 except requests.exceptions.MissingSchema: 8 print('Invalid URL "{}"'.format(url)) 9 return 10 11 if 阅读全文
posted @ 2019-11-14 16:02 TTTCoder 阅读(619) 评论(0) 推荐(0) 编辑
摘要: a^a = 0 一个数异或任何一个数偶数次值不变 阅读全文
posted @ 2019-10-29 20:40 TTTCoder 阅读(1131) 评论(0) 推荐(1) 编辑
摘要: 一、防止第四次挥手的报文段丢失,服务器端无法正常关闭。如果第四次挥手丢失,服务器端会重新发送第三次挥手的报文,请求断开连接。 二、2MSL时间可以保证本次连接所有报文失效失效,防止“已失效的连接请求报文段”出现在本连接中,避免被服务器端认为是一个新的连接请求。 阅读全文
posted @ 2019-09-19 21:33 TTTCoder 阅读(1781) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <vector> 3 #include <algorithm> 4 #include <string> 5 #include <cstdio> 6 using namespace std; 7 int a[100010]; 8 /* 9 void quick_sort(int *a,int left,int right){ 10 i 阅读全文
posted @ 2019-09-12 15:24 TTTCoder 阅读(220) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 16 下一页