Horje
java to puthon converter Code Example
java to puthon converter
import java.util.*;
import java.lang.*;
import java.io.*;

// Please name your class Main
class Main {
	public static void main(String[] args) {
        int answer=0,mod=1;
        double value;
        Scanner in = new Scanner(System.in);
        int p = in.nextInt();
        int q = in.nextInt();
        int n = in.nextInt();
        int m = in.nextInt();

        if(1<=p && p<=1000){
            if(0<=q && q<=1000){
                if(1<=n || m<=(10^9)){

                    for(int i=1;i<=n;i++) {

                        value = Math.pow(p, i) * Math.pow(i, q) ;
                        answer+=value;
                        
                        mod= answer % m;
                        

                        
                        }
                    
                        System.out.println(mod);
                            }
                        }
                    }
                }
}




Cpp

Related
c# unity rendering object Code Example c# unity rendering object Code Example
ue4 set size of widget c++ Code Example ue4 set size of widget c++ Code Example
switch c++ Code Example switch c++ Code Example
create a 2d vector in c++ Code Example create a 2d vector in c++ Code Example
how can I convert each and every element of string push into set in c++? Code Example how can I convert each and every element of string push into set in c++? Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8