Advertisement
Sasha_Gabov

Untitled

Apr 6th, 2024
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.26 KB | None | 0 0
  1. var
  2.   a : array [1..100] of longint;
  3.   i, n, sum, k, max, nom : longint;
  4. begin
  5.   readln(k);
  6.   readln(n);
  7.   for i:=1 to n do
  8.     readln(a[i]);
  9.   max:=a[1];
  10.   for i:=2 to n do
  11.     if a[i]>max then begin
  12.       maax:=a[i];
  13.       nom:=i;
  14.   writeln(nom);
  15. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement