Task: | baka |
Sender: | eXeP |
Submission time: | 2016-08-02 15:06:05 +0300 |
Language: | C++ |
Status: | READY |
Result: | 100 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 100 |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.06 s | details |
#2 | ACCEPTED | 0.06 s | details |
#3 | ACCEPTED | 0.06 s | details |
#4 | ACCEPTED | 0.06 s | details |
#5 | ACCEPTED | 0.06 s | details |
#6 | ACCEPTED | 0.06 s | details |
#7 | ACCEPTED | 0.06 s | details |
#8 | ACCEPTED | 0.05 s | details |
#9 | ACCEPTED | 0.05 s | details |
#10 | ACCEPTED | 0.06 s | details |
#11 | ACCEPTED | 0.06 s | details |
#12 | ACCEPTED | 0.06 s | details |
Compiler report
input/code.cpp: In function 'int main()': input/code.cpp:51:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < s.length(); ++i) ^
Code
#include <bits/stdc++.h> #define i64 long long #define u64 unsigned long long #define i32 int #define u32 unsigned int #define pii pair<int, int> #define pll pair<long long, long long> #define ld long double #define defmod 1000000007 #define mati64(a,b) vector<vector<i64>>(a, vector<i64>(b, 0)); using namespace std; int main(){ cin.sync_with_stdio(0); cin.tie(0); string s; cin >> s; map<char, int> fak; fak['A'] = 2; fak['B'] = 2; fak['C'] = 2; fak['D'] = 3; fak['E'] = 3; fak['F'] = 3; fak['G'] = 4; fak['H'] = 4; fak['I'] = 4; fak['J'] = 5; fak['K'] = 5; fak['L'] = 5; fak['M'] = 6; fak['N'] = 6; fak['O'] = 6; fak['P'] = 7; fak['Q'] = 7; fak['R'] = 7; fak['S'] = 7; fak['T'] = 8; fak['U'] = 8; fak['V'] = 8; fak['W'] = 9; fak['X'] = 9; fak['Y'] = 9; fak['Z'] = 9; int ans = 0; for(int i = 0; i < s.length(); ++i) ans+=fak[s[i]]+1; cout << ans << endl; return 0; }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
WA |
correct output |
---|
13 |
user output |
---|
13 |
Test 2
Verdict: ACCEPTED
input |
---|
UNUCIC |
correct output |
---|
36 |
user output |
---|
36 |
Test 3
Verdict: ACCEPTED
input |
---|
MACDNKIHFGBEHOJ |
correct output |
---|
74 |
user output |
---|
74 |
Test 4
Verdict: ACCEPTED
input |
---|
ABCDEFGHIJKLMNO |
correct output |
---|
75 |
user output |
---|
75 |
Test 5
Verdict: ACCEPTED
input |
---|
NCC |
correct output |
---|
13 |
user output |
---|
13 |
Test 6
Verdict: ACCEPTED
input |
---|
AUUI |
correct output |
---|
26 |
user output |
---|
26 |
Test 7
Verdict: ACCEPTED
input |
---|
UOEAIAOIUE |
correct output |
---|
56 |
user output |
---|
56 |
Test 8
Verdict: ACCEPTED
input |
---|
AOEUIIUEAOEAOIO |
correct output |
---|
82 |
user output |
---|
82 |
Test 9
Verdict: ACCEPTED
input |
---|
CFILOSVZXQCPFZO |
correct output |
---|
102 |
user output |
---|
102 |
Test 10
Verdict: ACCEPTED
input |
---|
BEHKNRUYKRUBNE |
correct output |
---|
89 |
user output |
---|
89 |
Test 11
Verdict: ACCEPTED
input |
---|
ADGJMPTWTPMJGDA |
correct output |
---|
94 |
user output |
---|
94 |
Test 12
Verdict: ACCEPTED
input |
---|
UNUCICA |
correct output |
---|
39 |
user output |
---|
39 |