fork download
  1. long long int F(string n){
  2.  
  3. long long int Ans = 0;
  4.  
  5. reverse(n.begin(),n.end());
  6.  
  7. int l = n.length();
  8.  
  9. for(int i=0; i<l; i+=1){
  10.  
  11. Ans += (long long int)(n[i]-'A'+1)*((long long int)(pow(26,i)));
  12. }
  13.  
  14. return Ans;
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:17: error: ‘string’ was not declared in this scope
 long long int F(string n){
                 ^~~~~~
stdout
Standard output is empty