mirror of
https://github.com/tiennm99/codeforces.git
synced 2026-10-14 10:18:15 +00:00
[Init] Solved solutions
This commit is contained in:
1 parent
51f667ac81
commit
20542601dd
131 files changed
+4148
No files matched your search
+32
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
|
||||
namespace problem_996B
|
||||
{
|
||||
class problem_996B
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
int n = int.Parse(Console.ReadLine());
|
||||
int[] a = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
|
||||
int m = a[0];
|
||||
for (int i = 1; i < n; i++)
|
||||
{
|
||||
if (a[i] < m)
|
||||
{
|
||||
m = a[i];
|
||||
}
|
||||
}
|
||||
int p = m % n;
|
||||
while (a[p] > m)
|
||||
{
|
||||
m++;
|
||||
p++;
|
||||
if (p == n)
|
||||
{
|
||||
p = 0;
|
||||
}
|
||||
}
|
||||
Console.Write("{0}", p + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user