对于现场赛出题出到这么水表示无语。。。。

/*
 * hdu4464/win.cpp
 * Created on: 2012-11-17
 * Author    : ben
 */
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#include <stack>
#include <string>
#include <vector>
#include <deque>
#include <list>
#include <functional>
#include <numeric>
#include <cctype>
using namespace std;

int main() {
#ifndef ONLINE_JUDGE
    freopen("data.in", "r", stdin);
#endif
    int t = 1, n, len;
    char str[200];
    while(scanf("%d", &n) == 1) {
        int ans = 0;
        for(int i = 0; i < n; i++) {
            int temp = 0;
            scanf("%s", str);
            len = strlen(str);
            for(int j = 0; j < len; j++) {
                temp += str[j];
            }
            if(temp > ans) {
                ans = temp;
            }
        }
        printf("Case %d: %d\n", t++, ans);
    }
    return 0;
}

相关文章:

  • 2022-12-23
  • 2022-02-22
  • 2022-12-23
  • 2022-12-23
  • 2021-09-02
  • 2022-01-13
  • 2021-07-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-07
  • 2022-12-23
  • 2022-12-23
  • 2021-07-03
  • 2021-10-26
  • 2021-08-30
相关资源
相似解决方案