* Reorganize files in TestSuite dir for multiple languages * Add SPython samples to TestSuite * Update TestRunner to support multiple languages * Delete dll files accidentally pushed * Update .gitignore * Revert "Delete dll files accidentally pushed" This reverts commit 62bcba2b821d58ae51ec98e9dadcf621bb0fc003. * Update testing dir path in Testing.cs * Improve TestRunner output * Add random module and it's usage sample * Reorganize gitignore files * Move pascal tests back to TestSuite and create new TestSuiteLanguagePlugins folder for SPython * Revert "Update testing dir path in Testing.cs" This reverts commit 7d94eafb25292421bce8315520b4f6a0de001bbd. * Revert crlf changes in pascal tests * Test changes of _RebuildReleaseAndRunTestsForGitHubActions.bat * Revert "Test changes of _RebuildReleaseAndRunTestsForGitHubActions.bat" This reverts commit 234ceae3e3a339fbc68a6170e2bd201dab14d67d. * Test changes in StorageLocationPicker * Another test changes in StorageLocationPicker.cs * Rename LanguagePlugins folder to AdditionalLanguages * Decouple TestRunner from language names and parameters * Revert calling TestRunner without parameters in .bat files * Fix formatter tests nogui exception handling * Small refactoring in Testing.cs and TestRunner fix of working directory
19 lines
434 B
Plaintext
19 lines
434 B
Plaintext
# индекс минимального элемента
|
|
def argmin(arr: list[int]) -> int:
|
|
if len(arr) == 0:
|
|
return -1
|
|
res = 0
|
|
for i in range(1, len(arr)):
|
|
if arr[i] < arr[res]:
|
|
res = i
|
|
return res
|
|
|
|
|
|
|
|
|
|
print(argmin([1, 2, 3]))
|
|
print(argmin([3, 2, 1]))
|
|
# a = [4,9,16,8,2,15,13,13,15,2,8,16,9,4]
|
|
a = [i ** 2 % 17 for i in range(2, 16)]
|
|
print(argmin([i ** 2 % 17 for i in range(2, 16)]))
|