p1634专题

P1634 禽兽的传染病 python代码

x,n = list(map(int,input().split(" ")))y = 1for i in range(n):y = y * x + yprint(y)

Java 洛谷 P1634 禽兽的传染病

题目描述:题目链接:https://www.luogu.com.cn/problem/P1634 代码实例: import java.util.Scanner;public class Main{public static void main(String[] args) {Scanner scanner = new Scanner(System.in);long x = scanner.nex