//高次方
#include<iostream>using namespace std;
int main()
{
int i,x,y,last=1; /*变量last保存求X的Y次方过程中的部分乘积的后三位*/
cin>>x>>y;
for(i=1;i<=y;i++) /*X自乘Y次*/
last=last*x%1000; /*将last乘X后对1000取模,即求积的后三位*/
if (last%1000<10)
cout<<0<<0<<last%1000;
else if(last%1000<100)
cout<<0<<last%1000;
else
cout<<last%1000;
return 0;
}
//剩余文件数目
import java.util.*; public class Main{ public static void main(String args[]){ Scanner cin = new Scanner(System.in); List<String> needOperation=new ArrayList<String>(); while (cin.hasNext()){ String temp=cin.nextLine(); needOperation.add(temp); if (temp.equals("end")) { break; } } System.out.println("current "+fileOperation(needOperation)); } public static int fileOperation(List<String> needOperation ) { int total=0; String[] temp=new String[1000]; for (Iterator iterator = needOperation.iterator(); iterator.hasNext();) { String string = (String) iterator.next(); temp=string.split(" "); if (temp[0].equals("binding")) { total=total+Integer.parseInt(temp[1].toString()); }else if (temp[0].equals("remove")) { total=total-Integer.parseInt(temp[1].toString()); }else if (temp[0].equals("end")) { break; } } return total; } }