Submission #422723

# Submission time Handle Problem Language Result Execution time Memory
422723 2021-06-10T11:13:19 Z pvviet001 Sirni (COCI17_sirni) C++14
0 / 140
1 ms 388 KB
#include <bits/stdc++.h>
#define FT(i,a,b) for(int i=a; i<=b; ++i)
#define FB(i,a,b) for(int i=a; i>=b; --i)
#define ll long long
#define pii pair<int,int>
#define vi vector<int>
#define vvi vector<vector<int>>
#define vll vector<long long>
#define IO(NAME) \
    cin.tie(nullptr)->sync_with_stdio(false); \
    if(fopen(NAME ".inp","r")) freopen(NAME ".inp","r",stdin), \
    freopen(NAME ".out","w",stdout);
using namespace std;
const long long MOD = 1e9+7;
const int INF = 1e9+1;
const int maxN = 1e5+1;

int toNum(string s){
    int l=s.length(),res=0;
    if(l==1) return s[0]-'A'+1;
    else return (s[0]-'A'+1)*26 + s[l-1]-'A'+1;
    return res;
}

void sol() {
    string start,stop;
    cin>>start>>stop;
    cout<<toNum(stop) - toNum(start)+1;
}

int main() {
    sol();
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 388 KB Output isn't correct
2 Halted 0 ms 0 KB -