Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //1
- /*
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- long long N,M,T;
- int i,P=0;
- N^=M;
- T=(((1<<8)-1)<<3)|(((1<<39)-1)<<21);
- N&=T;
- for(i=0,N;N&=N-1)++P;
- }
- //2
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- string S;cin>>S;
- int i,mx='0';
- for(i=0;i<S.size();++i)
- if(S[i]>='0' && S[i]<='6' && S[i]>mx)mx=S[i];
- if(S=='0')cout<<0;
- else if(mx=='0')cout<<-1;
- else cout<<mx-'0';
- }
- //3
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- string S;cin>>S;
- int i,D='a'-'A';
- for(i=0;i<S.size();++i)
- if(S[i]>='a' && S[i]<='z')S[i]-=D;
- cout<<S;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement