This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from itertools import permutations | |
| class Solution: | |
| def minStickers(self, stickers: List[str], target: str) -> int: | |
| primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47] # 15 | |
| letters = {} | |
| for t in target: | |
| if t not in letters: | |
| letters[t] = primes.pop(0) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def getNewEPrice(up, customVar=None): | |
| margin_percent = .24 | |
| margin_fixed = 0 | |
| min_margin = 4 | |
| ao_fee = 1 | |
| x = (up + max((up * margin_percent + margin_fixed),min_margin) + ao_fee + 0.3) / (0.871) | |
| return int(x) + 0.99 | |
| print "%.5f" % getNewEPrice(10) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| it('should play nice with repeater when replacing with templateUrl', function() { | |
| module(function() { | |
| directive('repeatedTemplate', valueFn({ | |
| replace: true, | |
| templateUrl: 'template.html', | |
| })); | |
| }); | |
| inject(function($compile, $httpBackend, $rootScope) { | |
| $httpBackend.expect('GET', 'template.html'). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from collections import defaultdict | |
| def solve(words): | |
| letters = set() | |
| for word in words: | |
| letters.update(word) | |
| dependencies = get_dependencies(words) | |
| roots = build_roots(letters, dependencies) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Operating system: Linux | |
| 0.0.0 Linux 2.6.32-351-ec2 #62-Ubuntu SMP Mon Mar 4 09:24:50 UTC 2013 x86_64 | |
| CPU: amd64 | |
| family 6 model 44 stepping 2 | |
| 4 CPUs | |
| Crash reason: SIGSEGV | |
| Crash address: 0x3 | |
| Thread 0 (crashed) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Operating system: Linux | |
| 0.0.0 Linux 2.6.32-351-ec2 #62-Ubuntu SMP Mon Mar 4 09:24:50 UTC 2013 x86_64 | |
| CPU: amd64 | |
| family 6 model 44 stepping 2 | |
| 4 CPUs | |
| Crash reason: SIGSEGV | |
| Crash address: 0x18 | |
| Thread 0 (crashed) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Operating system: Linux | |
| 0.0.0 Linux 2.6.32-351-ec2 #62-Ubuntu SMP Mon Mar 4 09:24:50 UTC 2013 x86_64 | |
| CPU: amd64 | |
| family 6 model 44 stepping 2 | |
| 4 CPUs | |
| Crash reason: SIGSEGV | |
| Crash address: 0x3 | |
| Thread 0 (crashed) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Operating system: Linux | |
| 0.0.0 Linux 2.6.32-351-ec2 #62-Ubuntu SMP Mon Mar 4 09:24:50 UTC 2013 x86_64 | |
| CPU: amd64 | |
| family 6 model 44 stepping 2 | |
| 4 CPUs | |
| Crash reason: SIGSEGV | |
| Crash address: 0x3 | |
| Thread 0 (crashed) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Operating system: Linux | |
| 0.0.0 Linux 2.6.32-351-ec2 #62-Ubuntu SMP Mon Mar 4 09:24:50 UTC 2013 x86_64 | |
| CPU: amd64 | |
| family 6 model 44 stepping 2 | |
| 4 CPUs | |
| Crash reason: SIGSEGV | |
| Crash address: 0x3 | |
| Thread 0 (crashed) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Operating system: Linux | |
| 0.0.0 Linux 2.6.32-351-ec2 #62-Ubuntu SMP Mon Mar 4 09:24:50 UTC 2013 x86_64 | |
| CPU: amd64 | |
| family 6 model 44 stepping 2 | |
| 4 CPUs | |
| Crash reason: SIGSEGV | |
| Crash address: 0x3 | |
| Thread 0 (crashed) |
NewerOlder