今早在博客园和大家分享了一道昨晚微博中看到的小学奥数题,后来有朋友给出了答案.然后我尝试用python解答它. 原题是这样的: 数学题:好事好 + 要做好 = 要做好事,求 “好.事.做.要”的值分别是多少? 以下解题思路: list1=[0,1,2,3,4,5,6,7,8,9] for h in list1: for s in list1: for z in list1: for y in list1: if (h*100+s*10+h)+(y*100+z*10+h)==(y*1000+z*1…
高数Umaru系列(9)——哈士奇 http://acm.sdut.edu.cn/onlinejudge2/index.php/Home/Index/problemdetail/pid/3358.html Time Limit: 1000 ms Memory Limit: 65536 KiB Problem Description 由于高数巨养的喵星人太傲娇了,要天天吃新鲜猫粮而且还经常欺负高数巨,所以高数巨决定买几条哈士奇尝尝鲜.这天高数巨来到了二手狗市场买哈士奇,高数巨看完了所有的哈士奇…
@(BZOJ)[樹形DP, 三維DP] Description DotR (Defense of the Robots) Allstars是一个风靡全球的魔兽地图,他的规则简单与同样流行的地图DotA (Defense of the Ancients) Allstars.DotR里面的英雄只有一个属性--力量.他们需要购买装备来提升自己的 力量值,每件装备都可以使佩戴它的英雄的力量值提高固定的点数,所以英雄的力量值等于它购买的所有装备的力 量值之和.装备分为基本装备和高级装备两种.基本装备可以直…
Rating Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 714 Accepted Submission(s): 452 Special Judge Problem Description A little girl loves programming competition very much. Recently, she…
题目链接:http://abc069.contest.atcoder.jp/assignments A - K-City Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement In K-city, there are n streets running east-west, and m streets running north-south. Each street running east-w…
A - Addition and Subtraction Easy Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement Joisino wants to evaluate the formula "A op B". Here, A and B are integers, and the binary operator op is either + or -. Your task is…
Mine Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 352 Accepted Submission(s): 94 Problem Description Have you ever played a game in Windows: Mine? This game is played on a n*m board, just…