We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b95cf2d commit fe79a14Copy full SHA for fe79a14
Petya_and_Strings.cpp
@@ -0,0 +1,34 @@
1
+#include<bits/stdc++.h>
2
+using namespace std;
3
+int main()
4
+{
5
+ long long i;
6
+ string f,s;
7
+ while(cin>>f>>s)
8
+ {
9
+ long sum1=0,sum2=0;
10
+ for(i=0; i<f.size(); i++)
11
12
+ if(f[i]>='A'&&f[i]<='Z')
13
+ f[i]=f[i]-'A'+97;
14
+ if(s[i]>='A'&&s[i]<='Z')
15
+ s[i]=s[i]-'A'+97;
16
+ }
17
+ for(i=0; i<s.size(); i++)
18
19
+ if(f[i]>s[i])
20
21
+ cout<<"1\n";
22
+ return 0;}
23
+
24
+ if(s[i]>f[i])
25
26
+ cout<<"-1\n";
27
+ return 0;
28
29
30
31
+ cout<<"0\n";
32
33
34
+}
0 commit comments