1234567891011121314151617181920212223242526272829 |
- //我是个傻逼
- #include <iostream>
- using namespace std;
- int main()
- {
- int a;
- long long int x,y;
- y=1;
- cin>>x>>a;
- while(a!=1)
- {
- if(a%2==0)
- {
- x=x*x;
- a=a/2;
- }
- else
- {
- y=y*x;
- x=x*x;
- a=(a-1)/2;
- }
- cout<<x<<" "<<a<<" "<<y<<endl;
- }
- x=x*y;
- cout<<x<<endl;
- system("pause");
- return 0;
- }
|