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
24,571,320
ru
C++
string_ops
advanced
Напишите на C++ функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C++ функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
3,546,255
en
Python
var_decl
beginner
How to declare a variable weight with value 978327 in Python?
weight = 978327
### Instruction: How to declare a variable weight with value 978327 in Python? ### Response: weight = 978327
4,874,754
en
Python
var_decl
beginner
How to declare a variable y with value 76543 in Python?
y = 76543
### Instruction: How to declare a variable y with value 76543 in Python? ### Response: y = 76543
1,832,964
en
Unity
var_decl
beginner
How to declare a variable weight with value 475613 in Unity?
int weight = 475613;
### Instruction: How to declare a variable weight with value 475613 in Unity? ### Response: int weight = 475613;
38,116,755
kk
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; }
358,689
kk
C++
var_decl
beginner
C++ тілінде 850629 мәнімен value айнымалысын қалай жариялауға болады?
int value = 850629;
### Instruction: C++ тілінде 850629 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 850629;
2,524,814
kk
Python
var_decl
beginner
Python тілінде 285923 мәнімен size айнымалысын қалай жариялауға болады?
size = 285923
### Instruction: Python тілінде 285923 мәнімен size айнымалысын қалай жариялауға болады? ### Response: size = 285923
14,972,525
en
Java
logic_ops
intermediate
Write a function that determines if the number 131 is prime in Java.
public bool IsPrime() { int n = 131; 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 131 is prime in Java. ### Response: public bool IsPrime() { int n = 131; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
61,853,911
kk
Python
logic_ops
advanced
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))
59,781,184
kk
Unity
array_ops
intermediate
Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
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: Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### 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; }
291,055
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 8709.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(8709)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 8709. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(8709)); }
88,317,796
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; }
75,177,340
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; }
66,963,299
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
746,201
kk
C++
var_decl
beginner
C++ тілінде 959368 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 959368;
### Instruction: C++ тілінде 959368 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 959368;
30,696,333
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; }
4,013,296
ru
C++
var_decl
beginner
Как объявить переменную count со значением 350948 в C++?
int count = 350948;
### Instruction: Как объявить переменную count со значением 350948 в C++? ### Response: int count = 350948;
12,061,951
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
77,058,361
en
Python
logic_ops
advanced
Write a function that determines if the number 137 is prime in Python.
def is_prime(): n = 137 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 137 is prime in Python. ### Response: def is_prime(): n = 137 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
281,368
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 8581.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(8581));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 8581. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(8581));
893,596
en
C++
var_decl
beginner
How to declare a variable count with value 446050 in C++?
int count = 446050;
### Instruction: How to declare a variable count with value 446050 in C++? ### Response: int count = 446050;
18,136,978
kk
Unity
logic_ops
advanced
Unity тилінде 64 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 64; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 64 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 64; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
38,780,953
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аеёиоуыэюя')
24,307,067
ru
C++
array_ops
intermediate
Напишите на 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; }
36,222,983
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
4,706,692
ru
JavaScript
var_decl
beginner
Как объявить переменную y со значением 946919 в JavaScript?
let y = 946919;
### Instruction: Как объявить переменную y со значением 946919 в JavaScript? ### Response: let y = 946919;
88,566,395
kk
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; }
603,497
kk
C#
var_decl
beginner
C# тілінде 421485 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 421485;
### Instruction: C# тілінде 421485 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 421485;
56,575,755
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; }
4,151,824
en
C#
var_decl
beginner
How to declare a variable value with value 945302 in C#?
int value = 945302;
### Instruction: How to declare a variable value with value 945302 in C#? ### Response: int value = 945302;
550,678
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 3853-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(3853)); }
### Instruction: Unity тілінде 1-ден 3853-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(3853)); }
4,928,039
en
Python
var_decl
beginner
How to declare a variable level with value 522793 in Python?
level = 522793
### Instruction: How to declare a variable level with value 522793 in Python? ### Response: level = 522793
53,779
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 5959.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(5959));
### Instruction: Write a function in Java that sums numbers from 1 to 5959. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(5959));
73,676,450
kk
Unity
string_ops
advanced
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,919,087
en
Python
var_decl
beginner
How to declare a variable amount with value 593709 in Python?
amount = 593709
### Instruction: How to declare a variable amount with value 593709 in Python? ### Response: amount = 593709
32,911,233
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 281 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 281; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 281 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 281; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
32,856,219
en
Java
logic_ops
intermediate
Write logic to check if the year 2000 is a leap year in Java.
public bool IsLeap() { int y = 2000; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2000 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2000; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
48,840,224
kk
C++
string_ops
advanced
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; }
35,701,791
kk
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; }
3,642,498
kk
C#
var_decl
beginner
C# тілінде 558707 мәнімен value айнымалысын қалай жариялауға болады?
int value = 558707;
### Instruction: C# тілінде 558707 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 558707;
2,508,418
ru
JavaScript
var_decl
beginner
Как объявить переменную count со значением 250054 в JavaScript?
let count = 250054;
### Instruction: Как объявить переменную count со значением 250054 в JavaScript? ### Response: let count = 250054;
214,813
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 9816.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(9816));
### Instruction: Write a function in Java that sums numbers from 1 to 9816. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(9816));
65,730,361
kk
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; }
3,212,334
ru
Unity
var_decl
beginner
Как объявить переменную total со значением 730298 в Unity?
int total = 730298;
### Instruction: Как объявить переменную total со значением 730298 в Unity? ### Response: int total = 730298;
77,840,240
en
JavaScript
array_ops
advanced
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);
16,875,122
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; }
4,529,850
en
C#
var_decl
beginner
How to declare a variable limit with value 838093 in C#?
int limit = 838093;
### Instruction: How to declare a variable limit with value 838093 in C#? ### Response: int limit = 838093;
63,124,911
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); }
99,203,140
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; }
53,299,847
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(); }
30,001,528
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); }
937,055
ru
Python
var_decl
beginner
Как объявить переменную health со значением 389025 в Python?
health = 389025
### Instruction: Как объявить переменную health со значением 389025 в Python? ### Response: health = 389025
94,587,248
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; }
84,465,902
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); }
77,917,468
en
Unity
string_ops
advanced
Write a function that counts vowels in a text in Unity.
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 Unity. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
37,958,791
en
JavaScript
array_ops
advanced
Write a function that filters only even numbers from a list in JavaScript.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Write a function that filters only even numbers from a list in JavaScript. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
32,791,980
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
78,277,068
en
Java
string_ops
intermediate
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; }
1,983,919
kk
C#
var_decl
beginner
C# тілінде 153322 мәнімен x айнымалысын қалай жариялауға болады?
int x = 153322;
### Instruction: C# тілінде 153322 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 153322;
40,991,565
en
JavaScript
array_ops
intermediate
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();
87,853,630
en
JavaScript
string_ops
advanced
Write a function that counts vowels in a text in JavaScript.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Write a function that counts vowels in a text in JavaScript. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
554,466
en
Unity
var_decl
beginner
How to declare a variable total with value 222171 in Unity?
int total = 222171;
### Instruction: How to declare a variable total with value 222171 in Unity? ### Response: int total = 222171;
3,867,620
en
Java
var_decl
beginner
How to declare a variable data with value 85161 in Java?
int data = 85161;
### Instruction: How to declare a variable data with value 85161 in Java? ### Response: int data = 85161;
86,560,084
kk
C#
string_ops
advanced
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; }
23,278,656
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 191 простым.
public bool IsPrime() { int n = 191; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 191 простым. ### Response: public bool IsPrime() { int n = 191; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,665,627
kk
Java
var_decl
beginner
Java тілінде 813234 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 813234;
### Instruction: Java тілінде 813234 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 813234;
434,119
ru
C#
var_decl
beginner
Как объявить переменную count со значением 454280 в C#?
int count = 454280;
### Instruction: Как объявить переменную count со значением 454280 в C#? ### Response: int count = 454280;
23,331
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 12-ге дейінгі сандардың қосындысын есептейтін функция жаз.
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(12) << std::endl;
### Instruction: C++ тілінде 1-ден 12-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### 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(12) << std::endl;
51,320,208
kk
Unity
logic_ops
advanced
Unity тилінде 352 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 352; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 352 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 352; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
76,264,557
kk
Unity
logic_ops
advanced
Unity тилінде 2072 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2072; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2072 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2072; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
197,281
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 1817.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(1817)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 1817. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(1817)); }
63,584,538
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 100 простым.
public bool IsPrime() { int n = 100; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 100 простым. ### Response: public bool IsPrime() { int n = 100; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
57,539,892
kk
Java
string_ops
advanced
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
3,867,807
en
Python
var_decl
beginner
How to declare a variable index with value 329689 in Python?
index = 329689
### Instruction: How to declare a variable index with value 329689 in Python? ### Response: index = 329689
2,187,956
ru
Unity
var_decl
beginner
Как объявить переменную x со значением 185477 в Unity?
int x = 185477;
### Instruction: Как объявить переменную x со значением 185477 в Unity? ### Response: int x = 185477;
3,256,827
ru
C++
var_decl
beginner
Как объявить переменную size со значением 712879 в C++?
int size = 712879;
### Instruction: Как объявить переменную size со значением 712879 в C++? ### Response: int size = 712879;
81,247,677
kk
C#
logic_ops
intermediate
C# тилінде 2031 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2031; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2031 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2031; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
322,156
ru
JavaScript
factorial
advanced
Напиши функцию на JavaScript, которая вычисляет факториал числа 8225.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(8225));
### Instruction: Напиши функцию на JavaScript, которая вычисляет факториал числа 8225. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(8225));
16,206,267
kk
Unity
string_ops
intermediate
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
40,074,082
ru
Python
array_ops
advanced
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
27,196,377
en
Java
array_ops
advanced
Write a function that filters only even numbers from a list in 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: Write a function that filters only even numbers from a list in 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; }
53,355,180
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); }
3,679,069
en
Java
var_decl
beginner
How to declare a variable y with value 36318 in Java?
int y = 36318;
### Instruction: How to declare a variable y with value 36318 in Java? ### Response: int y = 36318;
40,135,399
kk
C++
logic_ops
intermediate
C++ тилінде 444 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 444; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 444 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 444; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
64,199,851
kk
C++
logic_ops
intermediate
C++ тилінде 8 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 8; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 8 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 8; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
840,291
ru
JavaScript
var_decl
beginner
Как объявить переменную y со значением 309923 в JavaScript?
let y = 309923;
### Instruction: Как объявить переменную y со значением 309923 в JavaScript? ### Response: let y = 309923;
664,882
ru
Java
var_decl
beginner
Как объявить переменную count со значением 268652 в Java?
int count = 268652;
### Instruction: Как объявить переменную count со значением 268652 в Java? ### Response: int count = 268652;
68,206,535
en
JavaScript
array_ops
advanced
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);
112,838
kk
Python
var_decl
beginner
Python тілінде 505108 мәнімен data айнымалысын қалай жариялауға болады?
data = 505108
### Instruction: Python тілінде 505108 мәнімен data айнымалысын қалай жариялауға болады? ### Response: data = 505108
42,783,096
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 57 простым.
function isPrime() { let n = 57; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 57 простым. ### Response: function isPrime() { let n = 57; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
85,059,511
en
JavaScript
string_ops
intermediate
Write a function that counts vowels in a text in JavaScript.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Write a function that counts vowels in a text in JavaScript. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
76,258,655
kk
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; }
35,183,610
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; }
1,133,659
en
Unity
var_decl
beginner
How to declare a variable result with value 443831 in Unity?
int result = 443831;
### Instruction: How to declare a variable result with value 443831 in Unity? ### Response: int result = 443831;
49,520,177
en
JavaScript
string_ops
advanced
Write a function that converts a string to uppercase in JavaScript.
const toUpper = s => s.toUpperCase();
### Instruction: Write a function that converts a string to uppercase in JavaScript. ### Response: const toUpper = s => s.toUpperCase();
36,963,818
kk
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аеёиоуыэюя')
33,290,115
ru
Unity
string_ops
intermediate
Напишите на 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: Напишите на 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; }
27,911,633
en
JavaScript
logic_ops
advanced
Write logic to check if the year 2069 is a leap year in JavaScript.
function isLeap() { let y = 2069; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2069 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2069; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
15,104,580
kk
Unity
string_ops
intermediate
Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
20,538,048
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()