码迷,mamicode.com
首页 >  
搜索关键字:guess    ( 609个结果
LeetCode 299. Bulls and Cows
secret和guess按位读入,如果相等bull就加1,不相等就在各自统计不同数字出现次数的数组里加1(s_map[i]指secret里数字i出现的次数)。最后s_map和g_map存的是各自string中位置不等的各数值出现的次数,cow等于两个数组中相同位置的最小数。
分类:其他好文   时间:2016-03-20 21:22:25    阅读次数:203
1562 Guess the number
       
分类:其他好文   时间:2016-03-12 22:37:58    阅读次数:306
弱智python小游戏猜数字
from random import randintnum = randint(0,100)print("Guess what I think:?")bingo = Falsewhile bingo == False: answer = int(input()) if answer < num: p
分类:编程语言   时间:2016-03-09 15:40:42    阅读次数:149
[LeetCode299]Bulls and Cows
题目: You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each
分类:其他好文   时间:2016-03-06 19:08:46    阅读次数:182
(20)循环语句
* while 循环 # while expression: statement(s) 猜数字 #!/usr/bin/env python # -*- coding: utf-8 -*- import random number = random.randint(1,101) guess=0 whi...
分类:其他好文   时间:2016-03-03 19:07:50    阅读次数:238
Lettcode_299_Bulls and Cows
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/50768550 You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time your friend...
分类:其他好文   时间:2016-02-29 23:24:00    阅读次数:233
第一天的作业题
素数个数 guess数字 列表集合
分类:其他好文   时间:2016-02-27 20:41:15    阅读次数:330
有一种acm题目叫做,奇葩!
本文全然没有技术含量,纯粹是娱乐。 我事实上想写点东西。可是近期好像做计算几何做得太多了,一种想说说不出东西的感觉,唯有写一下一些奇葩的题目了。 HDU3337:Guess the number http://acm.hdu.edu.cn/showproblem.php?pid=3337 题目意思:
分类:其他好文   时间:2016-02-27 17:51:09    阅读次数:173
Leetcode 299:Bulls and Cows
You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time your friend makes a guess, you provide a hint t...
分类:其他好文   时间:2016-02-25 10:22:12    阅读次数:142
【CodeForces 618B】Guess the Permutation
题 题意 有个1到n的一个全排列,告诉你第i个数和全部n个数相比的较小的是哪个,和自己相比时为0,于是有个主对角线为0的矩阵,求原数列 分析 我的想法是,给我们的每一行之和按大小排一下,就知道第i个数是数列里第几大的了。因为是n的全排列,所以第几大就是几。 按sum排完序后,r[sum[i].id]
分类:其他好文   时间:2016-02-12 06:05:22    阅读次数:253
609条   上一页 1 ... 45 46 47 48 49 ... 61 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!