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
15,608,968
en
JavaScript
string_ops
advanced
Write a function that checks if a string is a palindrome in JavaScript.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Write a function that checks if a string is a palindrome in JavaScript. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
2,311,639
ru
Java
var_decl
beginner
Как объявить переменную rate со значением 310937 в Java?
int rate = 310937;
### Instruction: Как объявить переменную rate со значением 310937 в Java? ### Response: int rate = 310937;
90,705,988
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
2,205,122
ru
Unity
var_decl
beginner
Как объявить переменную weight со значением 558023 в Unity?
int weight = 558023;
### Instruction: Как объявить переменную weight со значением 558023 в Unity? ### Response: int weight = 558023;
41,416,480
ru
C++
logic_ops
advanced
Напишите на C++ логику проверки, является ли год 1940 високосным.
public bool IsLeap() { int y = 1940; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1940 високосным. ### Response: public bool IsLeap() { int y = 1940; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
21,416,744
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
51,025,498
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 127 простым.
def is_prime(): n = 127 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 127 простым. ### Response: def is_prime(): n = 127 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
1,422,132
kk
C++
var_decl
beginner
C++ тілінде 259698 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 259698;
### Instruction: C++ тілінде 259698 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 259698;
1,427,379
en
C++
var_decl
beginner
How to declare a variable score with value 458066 in C++?
int score = 458066;
### Instruction: How to declare a variable score with value 458066 in C++? ### Response: int score = 458066;
4,830,763
ru
C#
var_decl
beginner
Как объявить переменную buffer со значением 804232 в C#?
int buffer = 804232;
### Instruction: Как объявить переменную buffer со значением 804232 в C#? ### Response: int buffer = 804232;
16,809,456
kk
C#
logic_ops
intermediate
C# тилінде 381 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 381; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 381 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 381; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
57,047,731
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; }
4,043,196
en
Java
var_decl
beginner
How to declare a variable timer with value 127354 in Java?
int timer = 127354;
### Instruction: How to declare a variable timer with value 127354 in Java? ### Response: int timer = 127354;
4,081,168
ru
Java
var_decl
beginner
Как объявить переменную health со значением 522383 в Java?
int health = 522383;
### Instruction: Как объявить переменную health со значением 522383 в Java? ### Response: int health = 522383;
77,717,276
en
C++
string_ops
intermediate
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; }
714,482
kk
C++
var_decl
beginner
C++ тілінде 743257 мәнімен data айнымалысын қалай жариялауға болады?
int data = 743257;
### Instruction: C++ тілінде 743257 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 743257;
168,983
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 9091.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(9091)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 9091. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(9091)); }
596,331
ru
Python
var_decl
beginner
Как объявить переменную buffer со значением 687979 в Python?
buffer = 687979
### Instruction: Как объявить переменную buffer со значением 687979 в Python? ### Response: buffer = 687979
74,209,470
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 7 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 7; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 7 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 7; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
22,414,969
en
JavaScript
array_ops
intermediate
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);
237,896
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 7203.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(7203));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 7203. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(7203));
32,981,725
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 3 простым.
public bool IsPrime() { int n = 3; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 3 простым. ### Response: public bool IsPrime() { int n = 3; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
288,614
en
Python
var_decl
beginner
How to declare a variable score with value 247268 in Python?
score = 247268
### Instruction: How to declare a variable score with value 247268 in Python? ### Response: score = 247268
63,497,673
en
C++
logic_ops
advanced
Write logic to check if the year 2083 is a leap year in C++.
public bool IsLeap() { int y = 2083; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2083 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2083; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
46,999,523
ru
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); }
4,575,674
en
Python
var_decl
beginner
How to declare a variable size with value 383188 in Python?
size = 383188
### Instruction: How to declare a variable size with value 383188 in Python? ### Response: size = 383188
96,519,603
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(); }
1,240,801
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 40-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(40)); }
### Instruction: Unity тілінде 1-ден 40-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(40)); }
78,288,993
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; }
27,423,144
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; }
72,511,444
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 454 простым.
public bool IsPrime() { int n = 454; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 454 простым. ### Response: public bool IsPrime() { int n = 454; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
38,546,847
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 444 простым.
function isPrime() { let n = 444; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 444 простым. ### Response: function isPrime() { let n = 444; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
28,161,404
en
Java
string_ops
intermediate
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(); }
29,437,440
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 56 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 56; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 56 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 56; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
45,840,447
en
JavaScript
array_ops
intermediate
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);
46,492,811
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]
22,995,516
en
Python
logic_ops
advanced
Write logic to check if the year 1931 is a leap year in Python.
def is_leap(): year = 1931 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1931 is a leap year in Python. ### Response: def is_leap(): year = 1931 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
359,363
kk
Python
factorial
advanced
Python тілінде 3756 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(3756))
### Instruction: Python тілінде 3756 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(3756))
93,407,074
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 2047 високосным.
public bool IsLeap() { int y = 2047; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2047 високосным. ### Response: public bool IsLeap() { int y = 2047; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
11,746,021
ru
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; }
277,789
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 802.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(802));
### Instruction: Write a function in Java that sums numbers from 1 to 802. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(802));
369,744
kk
Python
var_decl
beginner
Python тілінде 203855 мәнімен total айнымалысын қалай жариялауға болады?
total = 203855
### Instruction: Python тілінде 203855 мәнімен total айнымалысын қалай жариялауға болады? ### Response: total = 203855
34,109,521
en
Python
string_ops
advanced
Write a function that counts vowels in a text in Python.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Write a function that counts vowels in a text in Python. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
378,066
ru
C#
var_decl
beginner
Как объявить переменную offset со значением 760372 в C#?
int offset = 760372;
### Instruction: Как объявить переменную offset со значением 760372 в C#? ### Response: int offset = 760372;
73,116,620
en
C++
array_ops
advanced
Write a function that finds the maximum number in an array in C++.
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 C++. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
331,356
en
JavaScript
var_decl
beginner
How to declare a variable result with value 677028 in JavaScript?
let result = 677028;
### Instruction: How to declare a variable result with value 677028 in JavaScript? ### Response: let result = 677028;
54,797,405
en
C#
logic_ops
advanced
Write a function that determines if the number 385 is prime in C#.
public bool IsPrime() { int n = 385; 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 385 is prime in C#. ### Response: public bool IsPrime() { int n = 385; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,906,397
ru
C#
var_decl
beginner
Как объявить переменную score со значением 214881 в C#?
int score = 214881;
### Instruction: Как объявить переменную score со значением 214881 в C#? ### Response: int score = 214881;
4,408,943
kk
Unity
var_decl
beginner
Unity тілінде 114946 мәнімен y айнымалысын қалай жариялауға болады?
int y = 114946;
### Instruction: Unity тілінде 114946 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 114946;
55,698,195
ru
Java
array_ops
intermediate
Напишите на 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; }
17,182,280
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(); }
540,905
ru
Python
var_decl
beginner
Как объявить переменную health со значением 627002 в Python?
health = 627002
### Instruction: Как объявить переменную health со значением 627002 в Python? ### Response: health = 627002
3,086,961
en
C++
var_decl
beginner
How to declare a variable x with value 768811 in C++?
int x = 768811;
### Instruction: How to declare a variable x with value 768811 in C++? ### Response: int x = 768811;
82,448,130
en
Python
logic_ops
advanced
Write a function that determines if the number 76 is prime in Python.
def is_prime(): n = 76 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 76 is prime in Python. ### Response: def is_prime(): n = 76 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
53,339,949
ru
Java
array_ops
advanced
Напишите на Java функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Java функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
12,357,551
en
Python
logic_ops
intermediate
Write a function that determines if the number 119 is prime in Python.
def is_prime(): n = 119 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 119 is prime in Python. ### Response: def is_prime(): n = 119 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
21,971,686
en
Java
logic_ops
advanced
Write a function that determines if the number 374 is prime in Java.
public bool IsPrime() { int n = 374; 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 374 is prime in Java. ### Response: public bool IsPrime() { int n = 374; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
88,891,742
en
Python
array_ops
intermediate
Write a function that filters only even numbers from a list in Python.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Write a function that filters only even numbers from a list in Python. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
152,588
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 2051.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(2051)); }
### Instruction: Write a function in Unity that calculates the factorial of 2051. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(2051)); }
2,599,865
kk
C++
var_decl
beginner
C++ тілінде 206723 мәнімен x айнымалысын қалай жариялауға болады?
int x = 206723;
### Instruction: C++ тілінде 206723 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 206723;
53,487,983
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 466 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 466; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 466 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 466; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
348,027
kk
Python
var_decl
beginner
Python тілінде 554897 мәнімен data айнымалысын қалай жариялауға болады?
data = 554897
### Instruction: Python тілінде 554897 мәнімен data айнымалысын қалай жариялауға болады? ### Response: data = 554897
96,560,544
en
C#
array_ops
intermediate
Write a function that finds the maximum number in an array in C#.
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 C#. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
1,515,122
kk
Python
var_decl
beginner
Python тілінде 477908 мәнімен score айнымалысын қалай жариялауға болады?
score = 477908
### Instruction: Python тілінде 477908 мәнімен score айнымалысын қалай жариялауға болады? ### Response: score = 477908
54,722,365
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(); }
11,192,323
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 1953 високосным.
public bool IsLeap() { int y = 1953; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1953 високосным. ### Response: public bool IsLeap() { int y = 1953; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,344,941
en
Unity
var_decl
beginner
How to declare a variable level with value 632034 in Unity?
int level = 632034;
### Instruction: How to declare a variable level with value 632034 in Unity? ### Response: int level = 632034;
469,826
en
C++
var_decl
beginner
How to declare a variable index with value 282863 in C++?
int index = 282863;
### Instruction: How to declare a variable index with value 282863 in C++? ### Response: int index = 282863;
272,508
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 472.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(472) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 472. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(472) << std::endl;
187,282
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 1996.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(1996));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 1996. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(1996));
2,937,265
en
Java
var_decl
beginner
How to declare a variable timer with value 611093 in Java?
int timer = 611093;
### Instruction: How to declare a variable timer with value 611093 in Java? ### Response: int timer = 611093;
88,996,307
kk
Unity
array_ops
advanced
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; }
4,382,916
kk
JavaScript
var_decl
beginner
JavaScript тілінде 404516 мәнімен index айнымалысын қалай жариялауға болады?
let index = 404516;
### Instruction: JavaScript тілінде 404516 мәнімен index айнымалысын қалай жариялауға болады? ### Response: let index = 404516;
3,052,625
en
Unity
var_decl
beginner
How to declare a variable buffer with value 820739 in Unity?
int buffer = 820739;
### Instruction: How to declare a variable buffer with value 820739 in Unity? ### Response: int buffer = 820739;
3,045,947
kk
JavaScript
var_decl
beginner
JavaScript тілінде 844363 мәнімен result айнымалысын қалай жариялауға болады?
let result = 844363;
### Instruction: JavaScript тілінде 844363 мәнімен result айнымалысын қалай жариялауға болады? ### Response: let result = 844363;
49,991,337
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; }
87,157,833
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; }
22,670,908
en
C#
logic_ops
intermediate
Write logic to check if the year 1977 is a leap year in C#.
public bool IsLeap() { int y = 1977; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1977 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1977; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
41,623,704
ru
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; }
34,664,478
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; }
25,518,519
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
2,232,589
kk
JavaScript
var_decl
beginner
JavaScript тілінде 705351 мәнімен y айнымалысын қалай жариялауға болады?
let y = 705351;
### Instruction: JavaScript тілінде 705351 мәнімен y айнымалысын қалай жариялауға болады? ### Response: let y = 705351;
22,675,807
ru
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; }
17,561,485
kk
Python
logic_ops
intermediate
Python тилінде 158 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 158 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 158 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 158 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
60,916,701
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 431 простым.
def is_prime(): n = 431 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 431 простым. ### Response: def is_prime(): n = 431 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
49,933,202
kk
Python
array_ops
advanced
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]
2,131,732
ru
Java
var_decl
beginner
Как объявить переменную amount со значением 68520 в Java?
int amount = 68520;
### Instruction: Как объявить переменную amount со значением 68520 в Java? ### Response: int amount = 68520;
1,197,667
ru
JavaScript
var_decl
beginner
Как объявить переменную index со значением 63411 в JavaScript?
let index = 63411;
### Instruction: Как объявить переменную index со значением 63411 в JavaScript? ### Response: let index = 63411;
33,464
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 3984-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(3984));
### Instruction: JavaScript тілінде 1-ден 3984-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(3984));
149,373
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 1037.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(1037)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 1037. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(1037)); }
409,439
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 4769.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4769));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 4769. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4769));
26,185,988
kk
C++
logic_ops
advanced
C++ тилінде 1916 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1916; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1916 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1916; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
54,335,742
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 1917 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1917; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1917 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1917; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
78,610,759
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; }
49,603,162
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(); }
11,971,647
ru
Java
string_ops
advanced
Напишите на 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; }
93,353,978
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
33,739,623
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(); }
68,255,866
kk
C#
logic_ops
intermediate
C# тилінде 434 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 434; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 434 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 434; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
55,225,952
kk
Java
logic_ops
intermediate
Java тилінде 1916 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1916; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1916 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1916; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }