/HOMEWORK - Bài tập ngày Tết

<Problem>

http://ntucoder.net/Problem/Details/5512
              Uses Crt;
        Var     n,i:longint;
                kq:int64;
                a:array[1..100000] of longint;
        Function Ucln(a,b:longint):longint;
        begin if a mod b=0 then exit(b) else UCLN:=UCLN(b,a mod b); end;
        Begin
            readln(n);
            for i:=1 to n do begin read(a[i]); if i=1 then kq:=a[i] else kq:=UCLN(kq,a[i]); end;
            writeln(kq*n);
            readln;
        End.