Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;typedef long long _u;char _(_u __u, _u __u_, _u __u__, _u __u___=1){while(__u_){
- if(__u_&1) __u___*=__u;__u___%=__u__;__u*=__u;__u%=__u__;__u_>>=1;}return (char)(__u___%__u__);}int main()
- {_u __u__,_false,__u;cin>>__u__>>_false;while(cin>>__u)cout<<_(__u,_false,__u__);return 0;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement