2015年5月13日
摘要: //Link https://www.hackerrank.com/challenges/sherlock-and-squares 1 from math import sqrt # 用什么,引什么,减少浪费和错误可能性 2 3 4 def main(): 5 t = int(raw_... 阅读全文
posted @ 2015-05-13 19:12 sangocare 阅读(179) 评论(0) 推荐(0) 编辑
摘要: //自己 1 def main(): 2 t = int(raw_input()) 3 for _ in range(t): 4 units = 0 5 b, w = map(int, raw_input().strip().split(' ')) ... 阅读全文
posted @ 2015-05-13 18:33 sangocare 阅读(250) 评论(0) 推荐(0) 编辑
摘要: Link: https://www.hackerrank.com/challenges/acm-icpc-team/submissions/code/11617807 1 def count_max_topics(konw_topics): 2 max_topics = 0 3 m... 阅读全文
posted @ 2015-05-13 16:42 sangocare 阅读(313) 评论(0) 推荐(0) 编辑
2015年5月12日
摘要: 1 from __future__ import print_function 2 3 4 def main(): 5 t = int(raw_input()) 6 for _ in range(t): 7 n = int(raw_input()) 8 ... 阅读全文
posted @ 2015-05-12 17:22 sangocare 阅读(177) 评论(0) 推荐(0) 编辑
2015年5月10日
摘要: 1 from decimal import getcontext, Decimal 2 3 4 def main(): 5 n = int(raw_input()) 6 p = int(raw_input()) 7 8 getcontext().prec = p+10... 阅读全文
posted @ 2015-05-10 18:34 sangocare 阅读(286) 评论(0) 推荐(0) 编辑
2015年5月9日
摘要: https://www.hackerrank.com/challenges/halloween-party 1 def main(): 2 t = int(raw_input()) 3 for _ in range(t): 4 k = int(raw_input())... 阅读全文
posted @ 2015-05-09 17:26 sangocare 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 1 def main(): 2 t = int(raw_input()) 3 for _ in range(t): 4 n, k = map(int, raw_input().strip().split(' ')) 5 lateNum = 0 6 ... 阅读全文
posted @ 2015-05-09 17:14 sangocare 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1 def main(): 2 n = int(raw_input()) 3 arr = map(int, raw_input().strip().split()) 4 5 for i in range(n): 6 cutNum = 0 7 ... 阅读全文
posted @ 2015-05-09 17:03 sangocare 阅读(201) 评论(0) 推荐(0) 编辑
摘要: https://www.hackerrank.com/challenges/lonely-integer 1 def main(): 2 n = int(raw_input()) 3 s = dict() 4 a = 0 5 6 arr = map(int,raw_... 阅读全文
posted @ 2015-05-09 12:17 sangocare 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 1 def numOperations(testStr): 2 num = 0 3 n = len(testStr) 4 for i in range(n / 2): 5 num += abs(ord(testStr[i]) - ord(testStr[n ... 阅读全文
posted @ 2015-05-09 10:10 sangocare 阅读(218) 评论(0) 推荐(0) 编辑