id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
224,952
kk
Unity
factorial
advanced
Unity тілінде 4947 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(4947)); }
### Instruction: Unity тілінде 4947 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(4947)); }
27,650,032
ru
Unity
logic_ops
advanced
Напишите на Unity функцию, определяющую, является ли число 276 простым.
public bool IsPrime() { int n = 276; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 276 простым. ### Response: public bool IsPrime() { int n = 276; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
95,825,848
kk
Python
string_ops
advanced
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
73,417,783
en
Java
string_ops
intermediate
Write a function that checks if a string is a palindrome in Java.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Java. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
59,756,425
kk
Java
logic_ops
advanced
Java тилінде 2075 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2075; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 2075 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2075; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
94,958,630
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 2081 is a leap year in JavaScript.
function isLeap() { let y = 2081; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2081 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2081; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
4,117,774
kk
Python
var_decl
beginner
Python тілінде 932952 мәнімен amount айнымалысын қалай жариялауға болады?
amount = 932952
### Instruction: Python тілінде 932952 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: amount = 932952
3,378,387
ru
Java
var_decl
beginner
Как объявить переменную data со значением 954186 в Java?
int data = 954186;
### Instruction: Как объявить переменную data со значением 954186 в Java? ### Response: int data = 954186;
2,691,530
en
Python
var_decl
beginner
How to declare a variable offset with value 36950 in Python?
offset = 36950
### Instruction: How to declare a variable offset with value 36950 in Python? ### Response: offset = 36950
1,142,976
en
C++
var_decl
beginner
How to declare a variable value with value 961918 in C++?
int value = 961918;
### Instruction: How to declare a variable value with value 961918 in C++? ### Response: int value = 961918;
2,025,576
kk
Python
var_decl
beginner
Python тілінде 793865 мәнімен total айнымалысын қалай жариялауға болады?
total = 793865
### Instruction: Python тілінде 793865 мәнімен total айнымалысын қалай жариялауға болады? ### Response: total = 793865
35,007,151
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 2000 високосным.
public bool IsLeap() { int y = 2000; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 2000 високосным. ### Response: public bool IsLeap() { int y = 2000; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
476,794
kk
C#
var_decl
beginner
C# тілінде 258947 мәнімен x айнымалысын қалай жариялауға болады?
int x = 258947;
### Instruction: C# тілінде 258947 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 258947;
2,033,603
kk
Unity
var_decl
beginner
Unity тілінде 149057 мәнімен level айнымалысын қалай жариялауға болады?
int level = 149057;
### Instruction: Unity тілінде 149057 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 149057;
45,852,264
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
1,796,879
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 5944.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(5944));
### Instruction: Write a function in Java that sums numbers from 1 to 5944. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(5944));
60,942,553
en
C#
logic_ops
intermediate
Write logic to check if the year 1997 is a leap year in C#.
public bool IsLeap() { int y = 1997; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1997 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1997; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
51,173,544
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 424 простым.
def is_prime(): n = 424 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 424 простым. ### Response: def is_prime(): n = 424 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
32,592,676
ru
C#
string_ops
intermediate
Напишите на C# функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C# функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
29,151,616
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 449 простым.
public bool IsPrime() { int n = 449; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 449 простым. ### Response: public bool IsPrime() { int n = 449; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
963,326
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 2818.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(2818));
### Instruction: Write a function in Java that sums numbers from 1 to 2818. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(2818));
52,555,001
en
Java
string_ops
advanced
Write a function that checks if a string is a palindrome in Java.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Java. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
1,406,884
en
Java
var_decl
beginner
How to declare a variable size with value 463293 in Java?
int size = 463293;
### Instruction: How to declare a variable size with value 463293 in Java? ### Response: int size = 463293;
689,832
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 3885.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(3885)); }
### Instruction: Write a function in Unity that calculates the factorial of 3885. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(3885)); }
68,313,967
en
C#
logic_ops
intermediate
Write logic to check if the year 2089 is a leap year in C#.
public bool IsLeap() { int y = 2089; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2089 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2089; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
36,312,252
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
55,165,221
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
23,783,389
en
Python
logic_ops
intermediate
Write a function that determines if the number 70 is prime in Python.
def is_prime(): n = 70 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Write a function that determines if the number 70 is prime in Python. ### Response: def is_prime(): n = 70 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
93,938,359
kk
C#
logic_ops
advanced
C# тилінде 1917 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1917; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 1917 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1917; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
99,543,099
ru
Java
array_ops
intermediate
Напишите на Java функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Java функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
3,617,540
kk
C#
var_decl
beginner
C# тілінде 590520 мәнімен total айнымалысын қалай жариялауға болады?
int total = 590520;
### Instruction: C# тілінде 590520 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 590520;
2,598,128
ru
JavaScript
var_decl
beginner
Как объявить переменную value со значением 406033 в JavaScript?
let value = 406033;
### Instruction: Как объявить переменную value со значением 406033 в JavaScript? ### Response: let value = 406033;
889,384
en
Java
factorial
advanced
Write a function in Java that calculates the factorial of 5950.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(5950));
### Instruction: Write a function in Java that calculates the factorial of 5950. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(5950));
12,942,827
ru
Python
string_ops
advanced
Напишите на Python функцию, которая считает количество гласных букв в тексте.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Напишите на Python функцию, которая считает количество гласных букв в тексте. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
1,105,848
en
C#
var_decl
beginner
How to declare a variable health with value 482690 in C#?
int health = 482690;
### Instruction: How to declare a variable health with value 482690 in C#? ### Response: int health = 482690;
93,913,565
en
Python
string_ops
advanced
Write a function that checks if a string is a palindrome in Python.
def is_palindrome(s): return s == s[::-1]
### Instruction: Write a function that checks if a string is a palindrome in Python. ### Response: def is_palindrome(s): return s == s[::-1]
78,432,648
kk
C#
array_ops
advanced
C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
55,762,185
ru
C#
string_ops
intermediate
Напишите на C# функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на C# функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
7,893
ru
JavaScript
func_def
intermediate
Напиши функцию normalize в JavaScript, которая принимает size и удваивает его.
function normalize(size) { return size * 2; }
### Instruction: Напиши функцию normalize в JavaScript, которая принимает size и удваивает его. ### Response: function normalize(size) { return size * 2; }
17,313,701
en
Unity
string_ops
intermediate
Write a function that checks if a string is a palindrome in Unity.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Unity. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
36,434,549
kk
C#
array_ops
intermediate
C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
81,405,378
en
Java
logic_ops
advanced
Write logic to check if the year 1935 is a leap year in Java.
public bool IsLeap() { int y = 1935; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1935 is a leap year in Java. ### Response: public bool IsLeap() { int y = 1935; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,474,758
en
C++
var_decl
beginner
How to declare a variable level with value 43452 in C++?
int level = 43452;
### Instruction: How to declare a variable level with value 43452 in C++? ### Response: int level = 43452;
78,252,978
en
C++
string_ops
advanced
Write a function that counts vowels in a text in C++.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in C++. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
166,842
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 244.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(244))
### Instruction: Write a function in Python that sums numbers from 1 to 244. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(244))
51,573,685
en
C++
array_ops
advanced
Write a function that filters only even numbers from a list in C++.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in C++. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
4,753,299
en
C#
var_decl
beginner
How to declare a variable weight with value 157440 in C#?
int weight = 157440;
### Instruction: How to declare a variable weight with value 157440 in C#? ### Response: int weight = 157440;
3,824,448
ru
JavaScript
var_decl
beginner
Как объявить переменную size со значением 703108 в JavaScript?
let size = 703108;
### Instruction: Как объявить переменную size со значением 703108 в JavaScript? ### Response: let size = 703108;
65,692,475
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
1,699,619
en
Java
var_decl
beginner
How to declare a variable score with value 67382 in Java?
int score = 67382;
### Instruction: How to declare a variable score with value 67382 in Java? ### Response: int score = 67382;
1,595,916
en
C++
var_decl
beginner
How to declare a variable total with value 140868 in C++?
int total = 140868;
### Instruction: How to declare a variable total with value 140868 in C++? ### Response: int total = 140868;
795,845
ru
Unity
var_decl
beginner
Как объявить переменную weight со значением 510757 в Unity?
int weight = 510757;
### Instruction: Как объявить переменную weight со значением 510757 в Unity? ### Response: int weight = 510757;
12,374,236
kk
Java
array_ops
advanced
Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
4,665,546
kk
Unity
var_decl
beginner
Unity тілінде 226080 мәнімен count айнымалысын қалай жариялауға болады?
int count = 226080;
### Instruction: Unity тілінде 226080 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 226080;
761,012
en
JavaScript
var_decl
beginner
How to declare a variable health with value 815824 in JavaScript?
let health = 815824;
### Instruction: How to declare a variable health with value 815824 in JavaScript? ### Response: let health = 815824;
53,879,691
en
Java
string_ops
advanced
Write a function that counts vowels in a text in Java.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Java. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
3,354,564
en
Python
var_decl
beginner
How to declare a variable timer with value 215394 in Python?
timer = 215394
### Instruction: How to declare a variable timer with value 215394 in Python? ### Response: timer = 215394
77,427,777
ru
Unity
logic_ops
intermediate
Напишите на Unity логику проверки, является ли год 2051 високосным.
public bool IsLeap() { int y = 2051; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2051 високосным. ### Response: public bool IsLeap() { int y = 2051; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
51,603,033
ru
Java
string_ops
intermediate
Напишите на Java функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на Java функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
16,278,924
en
Unity
array_ops
advanced
Write a function that finds the maximum number in an array in Unity.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in Unity. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
63,358,880
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
70,468,203
kk
Unity
array_ops
intermediate
Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
379,710
ru
JavaScript
var_decl
beginner
Как объявить переменную weight со значением 450296 в JavaScript?
let weight = 450296;
### Instruction: Как объявить переменную weight со значением 450296 в JavaScript? ### Response: let weight = 450296;
96,861,642
en
JavaScript
array_ops
advanced
Write a function that reverses a list in JavaScript.
const reverseArr = arr => arr.reverse();
### Instruction: Write a function that reverses a list in JavaScript. ### Response: const reverseArr = arr => arr.reverse();
25,627,189
ru
Unity
array_ops
advanced
Напишите на Unity функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Unity функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
55,330,934
en
Python
logic_ops
intermediate
Write logic to check if the year 2056 is a leap year in Python.
def is_leap(): year = 2056 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2056 is a leap year in Python. ### Response: def is_leap(): year = 2056 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
72,443,808
en
C#
array_ops
advanced
Write a function that filters only even numbers from a list in C#.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in C#. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
78,530,054
ru
Unity
string_ops
intermediate
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
2,732,072
kk
C#
var_decl
beginner
C# тілінде 231173 мәнімен health айнымалысын қалай жариялауға болады?
int health = 231173;
### Instruction: C# тілінде 231173 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 231173;
623,712
kk
C#
sum_n
intermediate
C# тілінде 1-ден 1480-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(1480));
### Instruction: C# тілінде 1-ден 1480-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(1480));
852,837
ru
Python
factorial
advanced
Напиши функцию на Python, которая вычисляет факториал числа 9661.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(9661))
### Instruction: Напиши функцию на Python, которая вычисляет факториал числа 9661. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(9661))
91,277,343
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 83 простым.
def is_prime(): n = 83 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 83 простым. ### Response: def is_prime(): n = 83 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
31,768,999
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 2052 високосным.
public bool IsLeap() { int y = 2052; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2052 високосным. ### Response: public bool IsLeap() { int y = 2052; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
82,335,004
ru
Java
array_ops
advanced
Напишите на Java функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на Java функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
2,414,570
en
C#
var_decl
beginner
How to declare a variable amount with value 906267 in C#?
int amount = 906267;
### Instruction: How to declare a variable amount with value 906267 in C#? ### Response: int amount = 906267;
2,114,417
kk
Java
var_decl
beginner
Java тілінде 423020 мәнімен count айнымалысын қалай жариялауға болады?
int count = 423020;
### Instruction: Java тілінде 423020 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 423020;
36,126,227
en
Java
string_ops
advanced
Write a function that checks if a string is a palindrome in Java.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Java. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
78,314,472
en
Unity
array_ops
advanced
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
233,317
en
Java
factorial
advanced
Write a function in Java that calculates the factorial of 8961.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(8961));
### Instruction: Write a function in Java that calculates the factorial of 8961. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(8961));
35,600,687
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая фильтрует только четные числа из списка.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Напишите на Python функцию, которая фильтрует только четные числа из списка. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
70,760,185
ru
Java
string_ops
intermediate
Напишите на Java функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на Java функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
21,601,068
en
JavaScript
logic_ops
advanced
Write logic to check if the year 1933 is a leap year in JavaScript.
function isLeap() { let y = 1933; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1933 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1933; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
63,173,700
ru
Java
array_ops
advanced
Напишите на Java функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на Java функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
85,900,513
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 347 простым.
public bool IsPrime() { int n = 347; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 347 простым. ### Response: public bool IsPrime() { int n = 347; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
75,284,926
en
C++
logic_ops
intermediate
Write a function that determines if the number 153 is prime in C++.
public bool IsPrime() { int n = 153; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Write a function that determines if the number 153 is prime in C++. ### Response: public bool IsPrime() { int n = 153; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
51,297,459
kk
C#
array_ops
intermediate
C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
20,956,673
kk
Python
array_ops
advanced
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
3,728,650
kk
JavaScript
var_decl
beginner
JavaScript тілінде 894154 мәнімен x айнымалысын қалай жариялауға болады?
let x = 894154;
### Instruction: JavaScript тілінде 894154 мәнімен x айнымалысын қалай жариялауға болады? ### Response: let x = 894154;
3,479,149
ru
JavaScript
var_decl
beginner
Как объявить переменную total со значением 861512 в JavaScript?
let total = 861512;
### Instruction: Как объявить переменную total со значением 861512 в JavaScript? ### Response: let total = 861512;
1,315,712
en
C++
var_decl
beginner
How to declare a variable size with value 617191 in C++?
int size = 617191;
### Instruction: How to declare a variable size with value 617191 in C++? ### Response: int size = 617191;
1,519,223
en
C++
var_decl
beginner
How to declare a variable limit with value 201231 in C++?
int limit = 201231;
### Instruction: How to declare a variable limit with value 201231 in C++? ### Response: int limit = 201231;
26,184,248
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
66,191,114
ru
C#
string_ops
advanced
Напишите на C# функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на C# функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
2,345,553
kk
C#
var_decl
beginner
C# тілінде 621421 мәнімен result айнымалысын қалай жариялауға болады?
int result = 621421;
### Instruction: C# тілінде 621421 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 621421;
1,401,899
ru
C++
var_decl
beginner
Как объявить переменную level со значением 309364 в C++?
int level = 309364;
### Instruction: Как объявить переменную level со значением 309364 в C++? ### Response: int level = 309364;
39,208,000
ru
C#
array_ops
advanced
Напишите на C# функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на C# функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
1,405,818
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 6309.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6309)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 6309. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6309)); }
28,598,971
kk
Python
array_ops
advanced
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
45,018,795
kk
Python
logic_ops
advanced
Python тилінде 1933 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 1933 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 1933 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 1933 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
49,766,772
ru
Java
array_ops
intermediate
Напишите на Java функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Java функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }