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
UIBezierPath *path =[UIBezierPath bezierPath]; | |
CGPoint center = CGPointMake(rect.size.width / 2.0, rect.size.height / 2.0); | |
CGFloat radius = sqrt(pow(center.x, 2) + pow(center.y, 2)); | |
CGFloat angle = M_PI / self.count; | |
[self.color set]; | |
[path moveToPoint:center]; | |
for (NSUInteger i = 0; i < self.count; i++) { | |
[path addArcWithCenter:center radius:radius startAngle:2*i*angle endAngle:(2*i+1)*angle clockwise:YES]; | |
[path addLineToPoint:center]; | |
[path closePath]; |
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
#!/usr/bin/python | |
#-*-coding:utf-8-*- | |
#problem 61 | |
from itertools import permutations | |
F = (lambda x: x*(x+1)/2, lambda x: x**2, lambda x: x*(3*x-1)/2, lambda x: x*(2*x-1), lambda x: x*(5*x-3)/2, lambda x: x*(3*x-2)) | |
_numbers = dict(zip(range(6), [set() for n in range(6)])) | |
n = 1 |
NewerOlder