```markdown
给定非负整数n,打印3从0到3^n的幂次方值。输入一行包含n,输出n+1行以"pow(3,i) = "格式显示结果。样例输入3,输出:
pow(3,0) = 1
pow(3,1) = 3
pow(3,2) = 9
pow(3,3) = 27
```
代码实现如下(Python):
```python
n = int(input())
for i in range(n + 1):
print(f"pow(3,{i}) = {3**i}")
```