# -*- coding:utf-8 -*-
# -------------------------------
# ProjectName : autoDemo
# Author : zhangjk
# CreateTime : 2020/7/30 18:26
# FileName : 3
# Description : 
# --------------------------------
import math


def dengbi(a,n):
    s = 1
    for i in range(1,n):
        s = s + math.pow(a,i)
    return s

def p(a,n):
    return math.pow(a,n)


def main():
    print(dengbi(2,3))
    print(p(2,3))


if __name__ == '__main__':
    main()

6427b0391010fa043bf686bc9ab924a8dded5e0f
<mask token>


def dengbi(a, n):
    s = 1
    for i in range(1, n):
        s = s + math.pow(a, i)
    return s


<mask token>


def main():
    print(dengbi(2, 3))
    print(p(2, 3))


<mask token>

<mask token>


def dengbi(a, n):
    s = 1
    for i in range(1, n):
        s = s + math.pow(a, i)
    return s


def p(a, n):
    return math.pow(a, n)


def main():
    print(dengbi(2, 3))
    print(p(2, 3))


<mask token>

<mask token>


def dengbi(a, n):
    s = 1
    for i in range(1, n):
        s = s + math.pow(a, i)
    return s


def p(a, n):
    return math.pow(a, n)


def main():
    print(dengbi(2, 3))
    print(p(2, 3))


if __name__ == '__main__':
    main()

import math


def dengbi(a, n):
    s = 1
    for i in range(1, n):
        s = s + math.pow(a, i)
    return s


def p(a, n):
    return math.pow(a, n)


def main():
    print(dengbi(2, 3))
    print(p(2, 3))


if __name__ == '__main__':
    main()

# -*- coding:utf-8 -*-
# -------------------------------
# ProjectName : autoDemo
# Author : zhangjk
# CreateTime : 2020/7/30 18:26
# FileName : 3
# Description : 
# --------------------------------
import math


def dengbi(a,n):
    s = 1
    for i in range(1,n):
        s = s + math.pow(a,i)
    return s

def p(a,n):
    return math.pow(a,n)


def main():
    print(dengbi(2,3))
    print(p(2,3))


if __name__ == '__main__':
    main()
