Thursday, March 20, 2014

Codeforces Beta Round #85 (Div. 2 Only), problem: (A) Petya and Strings solution

Codeforces Beta Round #85 (Div. 2 Only), problem: (A) Petya and Strings: http://codeforces.com/problemset/problem/112/A

Codeforces Beta Round #85 (Div. 2 Only), problem: (A) Petya and Strings solution: http://ideone.com/DIWRcB

#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;

int main() {
    char a[105], b[105];
    scanf("%s%s", a, b);
    for(int i=0; i<strlen(a); i++) {
        if(a[i]>96) a[i]-=32;
        if(b[i]>96) b[i]-=32;
    }
    printf("%d", strcmp(a, b));
    return 0;
}


No comments:

Post a Comment