标签:each esc form therefore ace field mic des ble
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 617 Accepted Submission(s):
516
#include<iostream> #include<cstdio> using namespace std; string s; int ans,n; int main() { scanf("%d",&n); for(int i=1;i<=n;i++) { cin>>s;ans=0; for(int i=0;i<s.size();i++) { if(s[i]==‘C‘)ans+=12; if(s[i]==‘O‘)ans+=16; if(s[i]==‘H‘)ans++; } printf("%d\n",ans); } return 0; }
标签:each esc form therefore ace field mic des ble
原文地址:http://www.cnblogs.com/zzyh/p/7043698.html