首页 > TAG信息列表 > geshu

Leecode 914. 卡牌分组

var hasGroupsSizeX = function(deck) { // 对数组中的数字进行从小到大的排序 deck.sort((a,b)=>{ return a-b }) // 设置一个数组存放1 2 3 4......的个数 let num = [] let temp = deck[0] // 用来存相同数字的个数 let geshu =

PTA1023-C语言-组个最小数

#include <stdio.h> void Bubble_Sort(int a[],int len) { int i,j,temp; for(i = 0 ; i < len -1; i ++) { for(j = 0; j < len - 1 - i; j ++) { if(a[j] > a[j + 1]) { temp = a[j];

java课堂测试2第一阶段:方法运用

package test2; import java.util.*; public class Test2 { public static int generateRandom(int fanwei) { //生成随机数 Random random=new Random(); int R=random.nextInt(fanwei); return R;} public static String operator(int fanwei) { //生成随机运算符 Ran

无线传感器实验-低功率无线信道建模

  【实验要求】 对于给定的特定环境下的无线信号传播测量数据,建立相应的单斜率和多斜率对数路径接收功率模型,具体要求如下: 1、使用Matlab画出接收功率与距离关系的散点图; 2、使用Matlab画出平均接收功率与距离的关系曲线; 3、使用Matlab画出平均接收功率与对数距离的散点图,并使

简单电商购物程序(续1)

def logon(tename, tepassword, credit): if tename == logname and tepassword == logpassword: print("------------------------") print("欢迎您 " + name + " 进入Qin12商城 ") print("您的积分为:" + str(credi

简单电商购物程序(续1)

sum = 0gouwuche = ""shuliang = 0shouji = {"oppo": 1000, "vivo": 1200, "xiaomi": 1499}diannao = {"苹果8": 6667, "小米9": 2999, "华硕飞行堡垒": 8999} userku = ""psdku = ""nameku

else: break if a == "零食": print("1. 泡面 2元") print("2. 片片酥 4元") print("3. 火腿肠 3元")

简单电商购物程序(续1)

sum=0gouwuche=""shuliang=0notebook={"本子":3,"小本子":2,"大本子":5}pen={"签字笔":5,"圆珠笔":3,"铅笔":2}id=""pwd=""name={}sex={}integral="0"vip=""a=input("请输

input 输入框 值改变事件、正整数正则校验

var intReg = /^[1-9]\d*$/; $("#geshu").on("input",function(e){ var geshu = $("#geshu").val().trim(); if(!intReg.test(geshu)){ alert("个数必须为整数值!"); }else{ aler