3 solutions

  • 1
    @ 2025-5-18 14:19:22
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int n,z;cin>>n>>z;int ln=n;
    	for(int i=1;i<z;i++){
    		n=n*ln;
    		n=n%1000;
    		
    	}
    	if(n<100){
    		if (n<10){
    			cout<<"00";
    			cout<<n;
    			return 0;
    		}
    		else{
    			cout<<"0";
    			cout<<n;
    			return 0;
    		}
    	}else{
    		cout<<n;return 0;
    	}
    }
    ```

    Information

    ID
    884
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    (None)
    # Submissions
    180
    Accepted
    50
    Uploaded By