Header Ads

Header ADS

UVA-10079 || Pizza Cutting



10079 - Pizza Cutting:


try:
    while True:
        lines = int(input())
        if lines<0:
            break
        pieces = ((lines*(lines+1))//2) + 1
        print(pieces)
except EOFError:
    pass

No comments

Theme images by centauria. Powered by Blogger.