id
int64
0
100M
language
stringclasses
3 values
prog_lang
stringclasses
6 values
category
stringclasses
10 values
difficulty
stringclasses
3 values
instruction
stringlengths
30
86
output
stringlengths
7
192
text
stringlengths
92
300
19,214,115
en
Java
array_ops
intermediate
Write a function that finds the maximum number in an array in Java.
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 Java. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
12,402,744
ru
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); }
13,238,981
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 1943 високосным.
public bool IsLeap() { int y = 1943; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1943 високосным. ### Response: public bool IsLeap() { int y = 1943; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
73,010,502
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; }
73,111,759
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 2024 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2024; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2024 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2024; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
42,976,494
en
Python
logic_ops
intermediate
Write a function that determines if the number 193 is prime in Python.
def is_prime(): n = 193 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 193 is prime in Python. ### Response: def is_prime(): n = 193 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
79,993,324
en
Unity
string_ops
advanced
Write a function that converts a string to uppercase in Unity.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Unity. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,839,839
en
Java
var_decl
beginner
How to declare a variable weight with value 92801 in Java?
int weight = 92801;
### Instruction: How to declare a variable weight with value 92801 in Java? ### Response: int weight = 92801;
80,651,659
kk
C#
logic_ops
intermediate
C# тилінде 127 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 127; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 127 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 127; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
49,854,275
en
Java
string_ops
advanced
Write a function that converts a string to uppercase in Java.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Java. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
106,348
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 976.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(976) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 976. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(976) << std::endl;
662,499
ru
Python
var_decl
beginner
Как объявить переменную level со значением 233647 в Python?
level = 233647
### Instruction: Как объявить переменную level со значением 233647 в Python? ### Response: level = 233647
57,674,613
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); }
1,637,711
kk
C#
var_decl
beginner
C# тілінде 498756 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 498756;
### Instruction: C# тілінде 498756 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 498756;
4,351,375
kk
Unity
var_decl
beginner
Unity тілінде 468134 мәнімен x айнымалысын қалай жариялауға болады?
int x = 468134;
### Instruction: Unity тілінде 468134 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 468134;
86,785,963
en
Java
logic_ops
advanced
Write a function that determines if the number 164 is prime in Java.
public bool IsPrime() { int n = 164; 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 164 is prime in Java. ### Response: public bool IsPrime() { int n = 164; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,561,521
ru
C++
var_decl
beginner
Как объявить переменную level со значением 772157 в C++?
int level = 772157;
### Instruction: Как объявить переменную level со значением 772157 в C++? ### Response: int level = 772157;
21,251,110
ru
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; }
4,317,976
en
Java
var_decl
beginner
How to declare a variable health with value 258140 in Java?
int health = 258140;
### Instruction: How to declare a variable health with value 258140 in Java? ### Response: int health = 258140;
1,054,005
ru
C#
var_decl
beginner
Как объявить переменную count со значением 303058 в C#?
int count = 303058;
### Instruction: Как объявить переменную count со значением 303058 в C#? ### Response: int count = 303058;
64,380,374
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('');
41,166,823
ru
Java
string_ops
advanced
Напишите на 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; }
83,717,122
kk
C++
string_ops
intermediate
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; }
3,139,391
kk
Python
var_decl
beginner
Python тілінде 961177 мәнімен score айнымалысын қалай жариялауға болады?
score = 961177
### Instruction: Python тілінде 961177 мәнімен score айнымалысын қалай жариялауға болады? ### Response: score = 961177
20,387,385
en
C++
logic_ops
advanced
Write a function that determines if the number 308 is prime in C++.
public bool IsPrime() { int n = 308; 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 308 is prime in C++. ### Response: public bool IsPrime() { int n = 308; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
89,272,721
kk
Python
logic_ops
intermediate
Python тилінде 1944 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 1944 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 1944 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 1944 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
3,619,636
kk
Unity
var_decl
beginner
Unity тілінде 267193 мәнімен size айнымалысын қалай жариялауға болады?
int size = 267193;
### Instruction: Unity тілінде 267193 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 267193;
217,407
en
Python
var_decl
beginner
How to declare a variable count with value 550368 in Python?
count = 550368
### Instruction: How to declare a variable count with value 550368 in Python? ### Response: count = 550368
726,009
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 5375-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(5375) << std::endl;
### Instruction: C++ тілінде 1-ден 5375-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(5375) << std::endl;
42,517,271
kk
Python
logic_ops
intermediate
Python тилінде 97 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 97 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 97 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 97 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
704,767
kk
Java
var_decl
beginner
Java тілінде 890396 мәнімен value айнымалысын қалай жариялауға болады?
int value = 890396;
### Instruction: Java тілінде 890396 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 890396;
55,116,626
kk
Java
string_ops
advanced
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; }
3,330,359
kk
Java
var_decl
beginner
Java тілінде 81447 мәнімен result айнымалысын қалай жариялауға болады?
int result = 81447;
### Instruction: Java тілінде 81447 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 81447;
1,513,561
ru
Python
var_decl
beginner
Как объявить переменную data со значением 154968 в Python?
data = 154968
### Instruction: Как объявить переменную data со значением 154968 в Python? ### Response: data = 154968
4,436,425
ru
Unity
var_decl
beginner
Как объявить переменную result со значением 741948 в Unity?
int result = 741948;
### Instruction: Как объявить переменную result со значением 741948 в Unity? ### Response: int result = 741948;
54,982,720
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 1985 is a leap year in JavaScript.
function isLeap() { let y = 1985; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1985 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1985; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
38,647,680
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 6 простым.
public bool IsPrime() { int n = 6; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 6 простым. ### Response: public bool IsPrime() { int n = 6; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
19,312,690
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 339 простым.
function isPrime() { let n = 339; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 339 простым. ### Response: function isPrime() { let n = 339; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
26,232,767
kk
Python
array_ops
advanced
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
254,982
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 5084.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(5084)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 5084. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(5084)); }
15,956,610
en
Java
array_ops
intermediate
Write a function that reverses a list in Java.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Java. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
3,645,953
ru
Unity
var_decl
beginner
Как объявить переменную buffer со значением 78885 в Unity?
int buffer = 78885;
### Instruction: Как объявить переменную buffer со значением 78885 в Unity? ### Response: int buffer = 78885;
1,901,254
kk
Java
var_decl
beginner
Java тілінде 652704 мәнімен result айнымалысын қалай жариялауға болады?
int result = 652704;
### Instruction: Java тілінде 652704 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 652704;
77,008,192
kk
C#
array_ops
advanced
C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
299,126
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 8836.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(8836));
### Instruction: Write a function in Java that sums numbers from 1 to 8836. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(8836));
87,906,600
en
Java
array_ops
advanced
Write a function that finds the maximum number in an array in Java.
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 Java. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
260,987
en
Java
factorial
advanced
Write a function in Java that calculates the factorial of 3532.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(3532));
### Instruction: Write a function in Java that calculates the factorial of 3532. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(3532));
64,782,434
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 78 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 78; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 78 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 78; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
1,230,166
ru
C++
var_decl
beginner
Как объявить переменную score со значением 259642 в C++?
int score = 259642;
### Instruction: Как объявить переменную score со значением 259642 в C++? ### Response: int score = 259642;
65,877,445
en
Python
string_ops
intermediate
Write a function that converts a string to uppercase in Python.
def to_upper(s): return s.upper()
### Instruction: Write a function that converts a string to uppercase in Python. ### Response: def to_upper(s): return s.upper()
95,527
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 7895.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(7895));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 7895. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(7895));
237,292
kk
C#
factorial
advanced
C# тілінде 164 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(164));
### Instruction: C# тілінде 164 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(164));
679,189
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 9654-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(9654) << std::endl;
### Instruction: C++ тілінде 1-ден 9654-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(9654) << std::endl;
2,176,898
en
Unity
var_decl
beginner
How to declare a variable rate with value 16979 in Unity?
int rate = 16979;
### Instruction: How to declare a variable rate with value 16979 in Unity? ### Response: int rate = 16979;
14,563,204
ru
Python
string_ops
advanced
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
def is_palindrome(s): return s == s[::-1]
### Instruction: Напишите на Python функцию, которая проверяет, является ли строка палиндромом. ### Response: def is_palindrome(s): return s == s[::-1]
42,769,268
kk
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; }
966,778
kk
C#
var_decl
beginner
C# тілінде 931672 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 931672;
### Instruction: C# тілінде 931672 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 931672;
2,418,743
kk
Java
var_decl
beginner
Java тілінде 841757 мәнімен level айнымалысын қалай жариялауға болады?
int level = 841757;
### Instruction: Java тілінде 841757 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 841757;
202,053
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 8782.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(8782))
### Instruction: Write a function in Python that sums numbers from 1 to 8782. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(8782))
806,898
en
Unity
var_decl
beginner
How to declare a variable weight with value 712478 in Unity?
int weight = 712478;
### Instruction: How to declare a variable weight with value 712478 in Unity? ### Response: int weight = 712478;
2,508,306
kk
JavaScript
var_decl
beginner
JavaScript тілінде 967135 мәнімен x айнымалысын қалай жариялауға болады?
let x = 967135;
### Instruction: JavaScript тілінде 967135 мәнімен x айнымалысын қалай жариялауға болады? ### Response: let x = 967135;
49,184,785
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 222 простым.
function isPrime() { let n = 222; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 222 простым. ### Response: function isPrime() { let n = 222; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
3,037,223
en
Java
var_decl
beginner
How to declare a variable rate with value 855982 in Java?
int rate = 855982;
### Instruction: How to declare a variable rate with value 855982 in Java? ### Response: int rate = 855982;
2,306,210
ru
Python
var_decl
beginner
Как объявить переменную total со значением 175501 в Python?
total = 175501
### Instruction: Как объявить переменную total со значением 175501 в Python? ### Response: total = 175501
2,365,415
en
Unity
var_decl
beginner
How to declare a variable value with value 339806 in Unity?
int value = 339806;
### Instruction: How to declare a variable value with value 339806 in Unity? ### Response: int value = 339806;
4,650,121
en
JavaScript
var_decl
beginner
How to declare a variable amount with value 550519 in JavaScript?
let amount = 550519;
### Instruction: How to declare a variable amount with value 550519 in JavaScript? ### Response: let amount = 550519;
31,274,828
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 232 простым.
public bool IsPrime() { int n = 232; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 232 простым. ### Response: public bool IsPrime() { int n = 232; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
37,111,566
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); }
1,526,684
ru
Python
var_decl
beginner
Как объявить переменную size со значением 884208 в Python?
size = 884208
### Instruction: Как объявить переменную size со значением 884208 в Python? ### Response: size = 884208
91,078,257
en
C++
logic_ops
advanced
Write a function that determines if the number 347 is prime in C++.
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: Write a function that determines if the number 347 is prime in C++. ### 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; }
89,166,171
en
Java
string_ops
advanced
Write a function that converts a string to uppercase in Java.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Java. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
89,157,356
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; }
3,551,051
en
C#
var_decl
beginner
How to declare a variable health with value 703532 in C#?
int health = 703532;
### Instruction: How to declare a variable health with value 703532 in C#? ### Response: int health = 703532;
89,669,511
en
C++
logic_ops
intermediate
Write a function that determines if the number 28 is prime in C++.
public bool IsPrime() { int n = 28; 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 28 is prime in C++. ### Response: public bool IsPrime() { int n = 28; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
673,924
en
C#
var_decl
beginner
How to declare a variable x with value 335143 in C#?
int x = 335143;
### Instruction: How to declare a variable x with value 335143 in C#? ### Response: int x = 335143;
1,748,014
ru
Unity
var_decl
beginner
Как объявить переменную buffer со значением 117189 в Unity?
int buffer = 117189;
### Instruction: Как объявить переменную buffer со значением 117189 в Unity? ### Response: int buffer = 117189;
99,167,788
kk
C#
logic_ops
intermediate
C# тилінде 2089 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2089; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2089 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2089; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
86,098,787
kk
Python
logic_ops
advanced
Python тилінде 268 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 268 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 268 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 268 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
77,512,342
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 1934 високосным.
def is_leap(): year = 1934 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1934 високосным. ### Response: def is_leap(): year = 1934 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
58,522,674
kk
C++
string_ops
advanced
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
170,403
kk
C++
factorial
advanced
C++ тілінде 2506 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(2506) << std::endl;
### Instruction: C++ тілінде 2506 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(2506) << std::endl;
18,691,884
kk
Python
string_ops
advanced
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
29,920,663
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 1929 високосным.
public bool IsLeap() { int y = 1929; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1929 високосным. ### Response: public bool IsLeap() { int y = 1929; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
434,290
en
C#
sum_n
intermediate
Write a function in C# that sums numbers from 1 to 6365.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(6365));
### Instruction: Write a function in C# that sums numbers from 1 to 6365. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(6365));
76,009
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 4518.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(4518)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 4518. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(4518)); }
3,198,854
ru
Java
var_decl
beginner
Как объявить переменную weight со значением 599093 в Java?
int weight = 599093;
### Instruction: Как объявить переменную weight со значением 599093 в Java? ### Response: int weight = 599093;
89,208,666
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; }
110,932
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 2044.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(2044));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 2044. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(2044));
83,026,478
en
Unity
string_ops
advanced
Write a function that converts a string to uppercase in Unity.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Unity. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
4,794,412
en
Python
var_decl
beginner
How to declare a variable buffer with value 160495 in Python?
buffer = 160495
### Instruction: How to declare a variable buffer with value 160495 in Python? ### Response: buffer = 160495
4,239,003
en
C#
var_decl
beginner
How to declare a variable index with value 803430 in C#?
int index = 803430;
### Instruction: How to declare a variable index with value 803430 in C#? ### Response: int index = 803430;
364,258
ru
Python
factorial
advanced
Напиши функцию на Python, которая вычисляет факториал числа 8797.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(8797))
### Instruction: Напиши функцию на Python, которая вычисляет факториал числа 8797. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(8797))
257,052
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 3481.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(3481)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 3481. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(3481)); }
70,867,791
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 149 простым.
def is_prime(): n = 149 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 149 простым. ### Response: def is_prime(): n = 149 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
404,002
kk
Unity
var_decl
beginner
Unity тілінде 474140 мәнімен value айнымалысын қалай жариялауға болады?
int value = 474140;
### Instruction: Unity тілінде 474140 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 474140;
2,959,710
kk
Unity
var_decl
beginner
Unity тілінде 428124 мәнімен count айнымалысын қалай жариялауға болады?
int count = 428124;
### Instruction: Unity тілінде 428124 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 428124;
54,294,247
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; }
3,004,171
kk
Unity
var_decl
beginner
Unity тілінде 93711 мәнімен total айнымалысын қалай жариялауға болады?
int total = 93711;
### Instruction: Unity тілінде 93711 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 93711;
3,132,922
ru
C++
var_decl
beginner
Как объявить переменную amount со значением 956826 в C++?
int amount = 956826;
### Instruction: Как объявить переменную amount со значением 956826 в C++? ### Response: int amount = 956826;
1,259,671
en
JavaScript
var_decl
beginner
How to declare a variable rate with value 112265 in JavaScript?
let rate = 112265;
### Instruction: How to declare a variable rate with value 112265 in JavaScript? ### Response: let rate = 112265;