笔试算法题中,有时候是要自己处理输入,比如从键盘中接收一个数,整理了一些常用的,真正笔试之前可以看一看。 输入 循环输入: Scanner sc = new Scanner(System.in); while (sc.hasNextLine()){ String s = sc.nextLine(); ...
分类:
编程语言 时间:
2021-04-23 12:06:51
阅读次数:
0
1、测试1 [root@centos7 test2]# i=0 [root@centos7 test2]# max=5 [root@centos7 test2]# while((i<max));do echo $i;((i++));done 0 1 2 3 4 ...
分类:
系统相关 时间:
2021-04-23 12:03:54
阅读次数:
0
import os, zipfile def deflate(paths, zip_path): z = zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED, allowZip64=True, compresslevel=9) for path i ...
分类:
编程语言 时间:
2021-04-23 12:03:14
阅读次数:
0
水题。 int h[]={129,130}; int w[]={25,27}; int main() { int T; cin>>T; while(T--) { int sex,height,weight; cin>>sex>>height>>weight; vector<string> res; ...
分类:
其他好文 时间:
2021-04-23 11:57:55
阅读次数:
0
求点的最小外接矩 rect1 = cv2.minAreaRect(box): def back_forward_convert(coordinate, with_label=True): """ :param coordinate: format [x1, y1, x2, y2, x3, y3, x ...
分类:
编程语言 时间:
2021-04-23 11:53:53
阅读次数:
0
linux shell脚本中流程控制语句 if、for、while、case 1、if语句 [root@centos7 test2]# ls test.sh [root@centos7 test2]# pwd /home/test2 [root@centos7 test2]# cat test.sh ...
分类:
系统相关 时间:
2021-04-22 16:20:40
阅读次数:
0
#!/usr/bin/env python #-*- coding:utf-8 -*- num=0 while num<=10: print(num,end="\t") num +=1 print("**************************") num2=0 sum_all=0 whil ...
分类:
其他好文 时间:
2021-04-22 16:16:24
阅读次数:
0
1,设置背景色为透明色 设置alpha透明系数 renderer = new THREE.WebGLRenderer( { antialias: true, alpha: true } ); renderer.setClearAlpha(0.2); alpha: true 这个属性是关键,不然背景会 ...
分类:
其他好文 时间:
2021-04-22 15:57:26
阅读次数:
0
1、列表的排序 a = [1,2,3,4,9,7,6,5,8] a.sort() #默认升序排列,对象不变,元素排序 a.sort(reverse=True) #降序排序 import random #打乱,随机排序 random.shuffle(a) 用法二、 a = sorted(a) #默认升 ...
分类:
编程语言 时间:
2021-04-22 15:55:48
阅读次数:
0
二分查找的基本框架 int binarySearch(int[] nums, int target) { int left = 0, right = ...; while(...) { int mid = left + (right - left) / 2; if (nums[mid] == tar ...
分类:
其他好文 时间:
2021-04-22 15:54:34
阅读次数:
0