标签:div out int har open log img close lap
1 #include<iostream> 2 using namespace std; 3 int main() 4 { 5 char n; 6 int i=1; 7 int s=0; 8 while(cin.get(n)) 9 { 10 if (n==‘#‘)break; 11 if (n!=‘\n‘) 12 { 13 if (n!=‘ ‘) 14 s=s+i*(n-64); 15 i++; 16 } 17 if (n==‘\n‘) 18 { 19 cout<<s<<endl; 20 s=0; 21 i=1; 22 } 23 } 24 return 0; 25 }
ZOJ:2812
标签:div out int har open log img close lap
原文地址:http://www.cnblogs.com/domen0814/p/6806484.html