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
3,548,857
ru
JavaScript
var_decl
beginner
Как объявить переменную count со значением 246512 в JavaScript?
let count = 246512;
### Instruction: Как объявить переменную count со значением 246512 в JavaScript? ### Response: let count = 246512;
3,683,309
ru
JavaScript
var_decl
beginner
Как объявить переменную total со значением 56929 в JavaScript?
let total = 56929;
### Instruction: Как объявить переменную total со значением 56929 в JavaScript? ### Response: let total = 56929;
3,717,395
kk
JavaScript
var_decl
beginner
JavaScript тілінде 208361 мәнімен speed айнымалысын қалай жариялауға болады?
let speed = 208361;
### Instruction: JavaScript тілінде 208361 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: let speed = 208361;
4,827,869
ru
C++
var_decl
beginner
Как объявить переменную buffer со значением 312601 в C++?
int buffer = 312601;
### Instruction: Как объявить переменную buffer со значением 312601 в C++? ### Response: int buffer = 312601;
24,544,075
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
84,579,041
kk
C++
logic_ops
intermediate
C++ тилінде 78 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 78; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 78 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 78; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
46,901,224
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 43 is prime in JavaScript.
function isPrime() { let n = 43; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Write a function that determines if the number 43 is prime in JavaScript. ### Response: function isPrime() { let n = 43; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
27,822,780
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; }
65,095,630
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; }
56,981,689
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(); }
90,408,481
kk
Java
array_ops
intermediate
Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
4,193,684
kk
C#
var_decl
beginner
C# тілінде 696082 мәнімен index айнымалысын қалай жариялауға болады?
int index = 696082;
### Instruction: C# тілінде 696082 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 696082;
3,264,430
en
Java
var_decl
beginner
How to declare a variable y with value 409276 in Java?
int y = 409276;
### Instruction: How to declare a variable y with value 409276 in Java? ### Response: int y = 409276;
69,601,835
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
1,189,426
ru
C#
var_decl
beginner
Как объявить переменную buffer со значением 74132 в C#?
int buffer = 74132;
### Instruction: Как объявить переменную buffer со значением 74132 в C#? ### Response: int buffer = 74132;
3,693,757
ru
C#
var_decl
beginner
Как объявить переменную y со значением 445647 в C#?
int y = 445647;
### Instruction: Как объявить переменную y со значением 445647 в C#? ### Response: int y = 445647;
54,289,843
ru
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; }
1,295,022
ru
Java
var_decl
beginner
Как объявить переменную amount со значением 901460 в Java?
int amount = 901460;
### Instruction: Как объявить переменную amount со значением 901460 в Java? ### Response: int amount = 901460;
4,216,160
kk
Python
var_decl
beginner
Python тілінде 41538 мәнімен result айнымалысын қалай жариялауға болады?
result = 41538
### Instruction: Python тілінде 41538 мәнімен result айнымалысын қалай жариялауға болады? ### Response: result = 41538
531,476
kk
JavaScript
factorial
advanced
JavaScript тілінде 1269 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(1269));
### Instruction: JavaScript тілінде 1269 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(1269));
77,427,785
kk
JavaScript
string_ops
intermediate
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
92,244,185
en
JavaScript
string_ops
intermediate
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('');
16,247,806
kk
Java
array_ops
advanced
Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
1,199,635
kk
C++
var_decl
beginner
C++ тілінде 341061 мәнімен data айнымалысын қалай жариялауға болады?
int data = 341061;
### Instruction: C++ тілінде 341061 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 341061;
2,250,724
kk
C++
var_decl
beginner
C++ тілінде 960367 мәнімен result айнымалысын қалай жариялауға болады?
int result = 960367;
### Instruction: C++ тілінде 960367 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 960367;
82,025,190
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); }
206,453
ru
JavaScript
factorial
advanced
Напиши функцию на JavaScript, которая вычисляет факториал числа 3987.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(3987));
### Instruction: Напиши функцию на JavaScript, которая вычисляет факториал числа 3987. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(3987));
4,314,393
kk
Unity
var_decl
beginner
Unity тілінде 11404 мәнімен value айнымалысын қалай жариялауға болады?
int value = 11404;
### Instruction: Unity тілінде 11404 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 11404;
2,580,705
ru
Python
var_decl
beginner
Как объявить переменную y со значением 735573 в Python?
y = 735573
### Instruction: Как объявить переменную y со значением 735573 в Python? ### Response: y = 735573
3,205,818
kk
Java
var_decl
beginner
Java тілінде 547801 мәнімен total айнымалысын қалай жариялауға болады?
int total = 547801;
### Instruction: Java тілінде 547801 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 547801;
72,690,817
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 1959 високосным.
def is_leap(): year = 1959 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1959 високосным. ### Response: def is_leap(): year = 1959 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
22,320,073
en
C++
string_ops
intermediate
Write a function that converts a string to uppercase in C++.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in C++. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
36,422,613
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(); }
20,853,344
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(); }
2,505,281
kk
C++
var_decl
beginner
C++ тілінде 473488 мәнімен x айнымалысын қалай жариялауға болады?
int x = 473488;
### Instruction: C++ тілінде 473488 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 473488;
3,758,642
kk
C#
var_decl
beginner
C# тілінде 717660 мәнімен result айнымалысын қалай жариялауға болады?
int result = 717660;
### Instruction: C# тілінде 717660 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 717660;
100,102
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 9064-ге дейінгі сандардың қосындысын есептейтін функция жаз.
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(9064) << std::endl;
### Instruction: C++ тілінде 1-ден 9064-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### 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(9064) << std::endl;
93,252,427
ru
Unity
logic_ops
intermediate
Напишите на Unity логику проверки, является ли год 1928 високосным.
public bool IsLeap() { int y = 1928; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1928 високосным. ### Response: public bool IsLeap() { int y = 1928; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,074,786
ru
C#
var_decl
beginner
Как объявить переменную data со значением 162532 в C#?
int data = 162532;
### Instruction: Как объявить переменную data со значением 162532 в C#? ### Response: int data = 162532;
818,610
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 4736.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(4736));
### Instruction: Write a function in Java that sums numbers from 1 to 4736. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(4736));
2,471,047
ru
Python
var_decl
beginner
Как объявить переменную rate со значением 348759 в Python?
rate = 348759
### Instruction: Как объявить переменную rate со значением 348759 в Python? ### Response: rate = 348759
338,362
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 1208.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(1208));
### Instruction: Write a function in JavaScript that calculates the factorial of 1208. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(1208));
49,859,459
kk
Unity
array_ops
intermediate
Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
394,053
en
C#
var_decl
beginner
How to declare a variable total with value 842395 in C#?
int total = 842395;
### Instruction: How to declare a variable total with value 842395 in C#? ### Response: int total = 842395;
39,543,067
en
Java
logic_ops
intermediate
Write logic to check if the year 2046 is a leap year in Java.
public bool IsLeap() { int y = 2046; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2046 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2046; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,490,576
ru
Unity
var_decl
beginner
Как объявить переменную x со значением 334712 в Unity?
int x = 334712;
### Instruction: Как объявить переменную x со значением 334712 в Unity? ### Response: int x = 334712;
2,432,269
kk
JavaScript
var_decl
beginner
JavaScript тілінде 691068 мәнімен value айнымалысын қалай жариялауға болады?
let value = 691068;
### Instruction: JavaScript тілінде 691068 мәнімен value айнымалысын қалай жариялауға болады? ### Response: let value = 691068;
3,764,771
kk
JavaScript
var_decl
beginner
JavaScript тілінде 370862 мәнімен amount айнымалысын қалай жариялауға болады?
let amount = 370862;
### Instruction: JavaScript тілінде 370862 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: let amount = 370862;
30,685,574
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(); }
79,257,921
en
Unity
string_ops
intermediate
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(); }
3,540,634
kk
Unity
var_decl
beginner
Unity тілінде 506609 мәнімен value айнымалысын қалай жариялауға болады?
int value = 506609;
### Instruction: Unity тілінде 506609 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 506609;
3,180,663
kk
JavaScript
var_decl
beginner
JavaScript тілінде 435250 мәнімен buffer айнымалысын қалай жариялауға болады?
let buffer = 435250;
### Instruction: JavaScript тілінде 435250 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: let buffer = 435250;
1,847,239
en
JavaScript
var_decl
beginner
How to declare a variable result with value 506998 in JavaScript?
let result = 506998;
### Instruction: How to declare a variable result with value 506998 in JavaScript? ### Response: let result = 506998;
24,017,933
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]
93,394,352
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); }
19,627,589
kk
C#
logic_ops
advanced
C# тилінде 2059 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2059; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2059 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2059; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,126,400
kk
C#
var_decl
beginner
C# тілінде 63343 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 63343;
### Instruction: C# тілінде 63343 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 63343;
2,064,475
kk
Python
var_decl
beginner
Python тілінде 720653 мәнімен offset айнымалысын қалай жариялауға болады?
offset = 720653
### Instruction: Python тілінде 720653 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: offset = 720653
637,696
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 8903.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(8903));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 8903. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(8903));
2,229,028
en
C++
var_decl
beginner
How to declare a variable count with value 87726 in C++?
int count = 87726;
### Instruction: How to declare a variable count with value 87726 in C++? ### Response: int count = 87726;
30,710,136
kk
Python
string_ops
advanced
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
4,552,767
ru
Unity
var_decl
beginner
Как объявить переменную index со значением 875134 в Unity?
int index = 875134;
### Instruction: Как объявить переменную index со значением 875134 в Unity? ### Response: int index = 875134;
1,302,501
ru
C++
var_decl
beginner
Как объявить переменную x со значением 30198 в C++?
int x = 30198;
### Instruction: Как объявить переменную x со значением 30198 в C++? ### Response: int x = 30198;
46,671,344
kk
Unity
string_ops
advanced
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; }
38,417,562
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; }
20,278,211
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
63,588,706
en
C++
logic_ops
intermediate
Write logic to check if the year 1950 is a leap year in C++.
public bool IsLeap() { int y = 1950; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1950 is a leap year in C++. ### Response: public bool IsLeap() { int y = 1950; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
31,538,531
en
C++
logic_ops
advanced
Write a function that determines if the number 286 is prime in C++.
public bool IsPrime() { int n = 286; 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 286 is prime in C++. ### Response: public bool IsPrime() { int n = 286; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
98,487,131
en
JavaScript
logic_ops
advanced
Write logic to check if the year 2035 is a leap year in JavaScript.
function isLeap() { let y = 2035; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2035 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2035; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
1,232,828
en
Python
var_decl
beginner
How to declare a variable offset with value 488865 in Python?
offset = 488865
### Instruction: How to declare a variable offset with value 488865 in Python? ### Response: offset = 488865
39,999,711
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 1928 високосным.
public bool IsLeap() { int y = 1928; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1928 високосным. ### Response: public bool IsLeap() { int y = 1928; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
10,018,926
kk
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))
3,282,954
kk
Java
var_decl
beginner
Java тілінде 504025 мәнімен count айнымалысын қалай жариялауға болады?
int count = 504025;
### Instruction: Java тілінде 504025 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 504025;
912,396
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 5259.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(5259));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 5259. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(5259));
3,789,860
ru
JavaScript
var_decl
beginner
Как объявить переменную timer со значением 920802 в JavaScript?
let timer = 920802;
### Instruction: Как объявить переменную timer со значением 920802 в JavaScript? ### Response: let timer = 920802;
1,737,705
ru
JavaScript
var_decl
beginner
Как объявить переменную health со значением 225922 в JavaScript?
let health = 225922;
### Instruction: Как объявить переменную health со значением 225922 в JavaScript? ### Response: let health = 225922;
34,109,696
en
C#
string_ops
intermediate
Write a function that checks if a string is a palindrome in 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: Write a function that checks if a string is a palindrome in 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; }
82,146,551
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
def is_palindrome(s): return s == s[::-1]
### Instruction: Напишите на Python функцию, которая проверяет, является ли строка палиндромом. ### Response: def is_palindrome(s): return s == s[::-1]
1,976,277
kk
Python
var_decl
beginner
Python тілінде 203807 мәнімен amount айнымалысын қалай жариялауға болады?
amount = 203807
### Instruction: Python тілінде 203807 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: amount = 203807
3,460,371
ru
Java
var_decl
beginner
Как объявить переменную amount со значением 348898 в Java?
int amount = 348898;
### Instruction: Как объявить переменную amount со значением 348898 в Java? ### Response: int amount = 348898;
21,706,868
ru
Unity
array_ops
intermediate
Напишите на Unity функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на Unity функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
96,155,857
en
Python
logic_ops
intermediate
Write a function that determines if the number 376 is prime in Python.
def is_prime(): n = 376 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 376 is prime in Python. ### Response: def is_prime(): n = 376 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
1,839,849
en
JavaScript
var_decl
beginner
How to declare a variable offset with value 542185 in JavaScript?
let offset = 542185;
### Instruction: How to declare a variable offset with value 542185 in JavaScript? ### Response: let offset = 542185;
99,537,630
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
2,850,855
en
JavaScript
var_decl
beginner
How to declare a variable total with value 873530 in JavaScript?
let total = 873530;
### Instruction: How to declare a variable total with value 873530 in JavaScript? ### Response: let total = 873530;
45,654,992
kk
C#
logic_ops
advanced
C# тилінде 2038 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2038; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2038 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2038; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
54,087,744
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 20 простым.
public bool IsPrime() { int n = 20; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 20 простым. ### Response: public bool IsPrime() { int n = 20; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
84,317,494
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; }
80,336,990
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
4,940,976
ru
Unity
var_decl
beginner
Как объявить переменную data со значением 220726 в Unity?
int data = 220726;
### Instruction: Как объявить переменную data со значением 220726 в Unity? ### Response: int data = 220726;
78,244,537
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()
97,898,606
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 466 простым.
def is_prime(): n = 466 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 466 простым. ### Response: def is_prime(): n = 466 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
77,551,499
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 149 простым.
public bool IsPrime() { int n = 149; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 149 простым. ### Response: public bool IsPrime() { int n = 149; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
97,735,431
en
Unity
array_ops
advanced
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
51,772,187
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 1905 is a leap year in JavaScript.
function isLeap() { let y = 1905; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1905 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1905; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
232,774
kk
C#
sum_n
intermediate
C# тілінде 1-ден 4575-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4575));
### Instruction: C# тілінде 1-ден 4575-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4575));
95,720,398
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 168 простым.
def is_prime(): n = 168 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 168 простым. ### Response: def is_prime(): n = 168 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
182,296
kk
JavaScript
var_decl
beginner
JavaScript тілінде 749209 мәнімен size айнымалысын қалай жариялауға болады?
let size = 749209;
### Instruction: JavaScript тілінде 749209 мәнімен size айнымалысын қалай жариялауға болады? ### Response: let size = 749209;
3,746,090
en
Unity
var_decl
beginner
How to declare a variable result with value 621863 in Unity?
int result = 621863;
### Instruction: How to declare a variable result with value 621863 in Unity? ### Response: int result = 621863;
84,812,532
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 16 is prime in JavaScript.
function isPrime() { let n = 16; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Write a function that determines if the number 16 is prime in JavaScript. ### Response: function isPrime() { let n = 16; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }