Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func maxValue(p []int) int {
	highest := 0
	for i := 0; i < len(p); i++ {
		if p[i] > highest {
			highest = p[i]
		}
	}
	return highest
}

func main() {
	scanner.Split(bufio.ScanWords)
	for {
		n := nextInt()
		m := nextInt()
		if n == 0 && m == 0 {
			break
		}

		pSum := make([]int, n)
		for i := 0; i < m; i++ {
			for j := 0; j < n; j++ {
				pSum[j] += nextInt()
			}
		}
		fmt.Println(maxValue(pSum))
	}
}

Python: while True:
    n,m=map(int,input().split())
    if n==0 and m==0:
        break
    p=[list(map(int,input().split())) for i in range(m)]
    for i in range(1,m):
        for j in range(n):
            p[i][j]+=p[i-1][j]
    print(max(p[m-1]))

Python: import os,re,sys,operator
from collections import Counter,deque
from operator import itemgetter
from itertools import accumulate,combinations,groupby
from sys import stdin,setrecursionlimit
from copy import deepcopy
import heapq

setrecursionlimit(10**6)
while 1:
    n,m=map(int,stdin.readline().rstrip().split())
    if (n,m)==(0,0):
        break
    a=[list(map(int,stdin.readline().rstrip().split())) for _ in range(m)]
    print(max(sum(i) for i in zip(*a)))

Python: while 1:
    n, m = map(int, input().split())
    if n == 0:
        break
    a = []
    for _ in range(m):
        a.append(list(map(int, input().split())))
    b = []
    for i in range(n):
        s = 0
        for j in range(m):
            s += a[j][i]
        b.append(s)
    print(max(b))

Python: while True :
    a = list(map(int,input().split()))
    if a[0] == 0:
        break
    else:
        max_sum = 0
        s = 0
        table = []
        for i in range(a[1]):
            table.append(list(map(int,input().split())))
        for i in range(a[0]):
            s = 0
            for j in range(a[1]):
                s += table[j][i]
            max_sum = max(s,max_sum)
        print(max_sum)

Python: while True:
    n, m = map(int, input().split())
    if n == m == 0:
        break
    students = [0 for _ in range(n)]
    for _ in range(m):
        scores = list(map(int, input().split()))
        for i in range(n):
            students[i] += scores[i]
    print(max(students))

Python: while True:
    n,m = map(int, input().split())
    if(n+m  ==0):
        break
    li = list()
    for i in range(m):
        line = [num for num in map(int, input().split())]
        li.append(line)
    ans = [0 for i in range(n)]
    for i in range(m):
        for j in range(n):
            ans[j] += li[i][j]
    print(max(ans))

Python: #無限ループと標準入力両方0だったらおわる
while True:
    a,b = map(int,input().split())
    if a == 0 and b == 0:break
    kei = [0 for _ in range(a)]
    
    #標準入力をし入力値を合計する
    for i in range(b):
        line = list(map(int,input().split()))
        for j in range(0,a):
            kei[j] += line[j]
    
    #一番大きい数を出力する
    print(max(kei))

Python: def main():
    n,k = map(int,input().split())
    if n * k == 0:
        return False
    ans = [0 for _ in range(n)]
    for _ in range(k):
        a = list(map(int,input().split()))
        for i in range(n):
            ans[i] += a[i]
    print(max(ans))
    return True

while main():
    pass

Python: while (True):
    a, b = list(map(int, input().split(" ")))
    if(a == 0 and b == 0):
        break
    # print(a, b)
    score = [[0] for i in range(b)]
    for i in range(b):
        score[i] = list(map(int, input().split()))
    sum = 0
    maxSum = 0
    for i in range(a):
        sum = 0
        for j in range(b):
            sum += score[j][i]
            if (sum > maxSum):
                maxSum = sum
    print(maxSum)

C++: #include <bits/stdc++.h>
using namespace std;
/*{{{*/  //template
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rrep(i,n) for(int i=(n)-1;i>=0;i--)
constexpr int INF = numeric_limits<int>::max()/2;
constexpr long long LINF = numeric_limits<long long>::max()/3;
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define all(v) (v).begin(),(v).end()
#define sz(x) (int)(x).size()
#define debug(x) cerr<<#x<<":"<<x<<endl
#define debug2(x,y) cerr<<#x<<","<<#y":"<<x<<","<<y<<endl
//struct fin{ fin(){ cin.tie(0); ios::sync_with_stdio(false); } } fin_;
struct Double{ double d; explicit Double(double x) : d(x){} };
ostream& operator<<(ostream& os,const Double x){ os << fixed << setprecision(20) << x.d; return os; }
template<typename T> ostream& operator<<(ostream& os,const vector<T>& vec){ os << "["; for(const auto& v : vec){ os << v << ","; } os << "]"; return os; }
template<typename T,typename U> ostream& operator<<(ostream& os, const map<T,U>& mp){ os << "{"; for(auto& p : mp){ os << p << ","; } os << "}"; return os; }
template<typename T,typename U> ostream& operator<<(ostream& os,const pair<T,U>& p){ os << "(" << p.first << ","<< p.second <<")"; return os; }
template<typename T> ostream& operator<<(ostream& os,const set<T>& st){ os<<"{"; for(T v:st) os<<v<<","; os <<"}"; return os; }
template<typename T,typename U> inline void chmax(T &x,U y){ if(y>x) x = y; }
template<typename T,typename U> inline void chmin(T &x,U y){ if(y<x) x = y; }
using ll = long long;
using ull = unsigned long long;
using pii = std::pair<int,int>;
using vi = std::vector<int>;
typedef vector<vi> vvi;
ll gcd(ll a,ll b){ if(b==0) return a; else return gcd(b,a%b); }
constexpr ll TEN(int n) { return (n == 0) ? 1 : 10 * TEN(n - 1); }
//constexpr double eps = 1e-14; 
constexpr double eps = 1e-10; 
constexpr ll mod = 1e9+7;
const int dx[]={1,0,-1,0} ,dy[] = {0,1,0,-1};
/*}}}*/

void solve(int n,int m){
    vector<int> sum(n,0);
    rep(j,m){
        rep(i,n){
            int p; cin >> p;
            sum[i] += p;
        }
    }
    sort(all(sum));
    reverse(all(sum));
    cout << sum[0] << endl;
}

int main(){
    int n,m;
    while(1){
        cin >> n >> m;
        if(n == 0 and m == 0) break;
        solve(n,m);
    }
}

C++: #include <iostream>
#include <vector>

using namespace std;

bool solve() {
  int n, m;
  cin >> n >> m;
  if (n == 0 && m == 0) {
    return false;
  }
  vector<vector<int>> p(m, vector<int>(n));
  for (auto &i : p) {
    for (int &j : i) {
      cin >> j;
    }
  }
  int result = 0;
  for (int i = 0; i < n; ++i) {
    int s = 0;
    for (int j = 0; j < m; ++j) {
      s += p[j][i];
    }
    if (result < s) {
      result = s;
    }
  }
  cout << result << endl;
  return true;
}

int main() {
  while (solve()) {
  }
}

C++: #include<bits/stdc++.h>
using namespace std;
main(){
    int n,m;
    cin >> n >> m;

    while(n!=0){
        vector<int> sub(n,0);
        for(int j = 0;j<m;j++){
            for(int i = 0;i<n;i++){
                int a;
                cin >> a;
                sub.at(i) += a;
            }
        }

        sort(sub.begin(),sub.end());

        cout << sub.at(n-1) << endl;

        cin >> n >> m;
    }
    
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

int main() {
  while (true) {
    int n, m;
    cin >> n >> m;
    if (n == 0 && m == 0) {
      break;
    }
    vector<int> p(n, 0);
    int input;
    int i, j;
    for (i = 0; i < m; i++) {
      for (j = 0; j < n; j++) {
        cin >> input;
        p[j] += input;
      }
    }
    int result = 0;
    for (i = 0; i < n; i++) {
      result =  max(result, p[i]);
    }
    cout << result << endl;
  }
  return 0;
}