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
130,152
kk
C#
sum_n
intermediate
C# тілінде 1-ден 6637-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(6637));
### Instruction: C# тілінде 1-ден 6637-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(6637));
15,273,199
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
19,434,795
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,939,260
kk
Java
var_decl
beginner
Java тілінде 602398 мәнімен value айнымалысын қалай жариялауға болады?
int value = 602398;
### Instruction: Java тілінде 602398 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 602398;
1,857,057
kk
C++
var_decl
beginner
C++ тілінде 294687 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 294687;
### Instruction: C++ тілінде 294687 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 294687;
32,113,063
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 393 простым.
public bool IsPrime() { int n = 393; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 393 простым. ### Response: public bool IsPrime() { int n = 393; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,786,298
ru
Unity
var_decl
beginner
Как объявить переменную index со значением 781967 в Unity?
int index = 781967;
### Instruction: Как объявить переменную index со значением 781967 в Unity? ### Response: int index = 781967;
12,369,073
en
Unity
string_ops
advanced
Write a function that converts a string to uppercase in Unity.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Unity. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
978,736
ru
JavaScript
var_decl
beginner
Как объявить переменную size со значением 22090 в JavaScript?
let size = 22090;
### Instruction: Как объявить переменную size со значением 22090 в JavaScript? ### Response: let size = 22090;
151,229
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 8858.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(8858));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 8858. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(8858));
4,895,771
en
JavaScript
var_decl
beginner
How to declare a variable count with value 302603 in JavaScript?
let count = 302603;
### Instruction: How to declare a variable count with value 302603 in JavaScript? ### Response: let count = 302603;
30,477,308
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);
61,845,513
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; }
72,827,587
en
Unity
array_ops
intermediate
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; }
69,166,819
kk
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);
14,948,608
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 14 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 14; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 14 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 14; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
63,787
kk
C++
var_decl
beginner
C++ тілінде 207467 мәнімен score айнымалысын қалай жариялауға болады?
int score = 207467;
### Instruction: C++ тілінде 207467 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 207467;
3,391,785
kk
JavaScript
var_decl
beginner
JavaScript тілінде 516498 мәнімен data айнымалысын қалай жариялауға болады?
let data = 516498;
### Instruction: JavaScript тілінде 516498 мәнімен data айнымалысын қалай жариялауға болады? ### Response: let data = 516498;
426,817
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 5014-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5014)); }
### Instruction: Unity тілінде 1-ден 5014-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5014)); }
58,637,498
en
C#
logic_ops
advanced
Write a function that determines if the number 427 is prime in C#.
public bool IsPrime() { int n = 427; 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 427 is prime in C#. ### Response: public bool IsPrime() { int n = 427; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
52,253,822
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('');
60,800,179
en
Java
logic_ops
intermediate
Write logic to check if the year 1943 is a leap year in Java.
public bool IsLeap() { int y = 1943; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1943 is a leap year in Java. ### Response: public bool IsLeap() { int y = 1943; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,391,868
en
Java
var_decl
beginner
How to declare a variable weight with value 237060 in Java?
int weight = 237060;
### Instruction: How to declare a variable weight with value 237060 in Java? ### Response: int weight = 237060;
89,104,193
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; }
73,638,062
kk
Python
string_ops
intermediate
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
def is_palindrome(s): return s == s[::-1]
### Instruction: Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: def is_palindrome(s): return s == s[::-1]
3,839,032
ru
Unity
var_decl
beginner
Как объявить переменную y со значением 420767 в Unity?
int y = 420767;
### Instruction: Как объявить переменную y со значением 420767 в Unity? ### Response: int y = 420767;
2,472,630
en
Unity
var_decl
beginner
How to declare a variable rate with value 397908 in Unity?
int rate = 397908;
### Instruction: How to declare a variable rate with value 397908 in Unity? ### Response: int rate = 397908;
99,204,267
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;
4,884,081
kk
C++
var_decl
beginner
C++ тілінде 472712 мәнімен index айнымалысын қалай жариялауға болады?
int index = 472712;
### Instruction: C++ тілінде 472712 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 472712;
194,671
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 8541-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(8541)); }
### Instruction: Unity тілінде 1-ден 8541-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(8541)); }
74,416,709
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 1999 високосным.
def is_leap(): year = 1999 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1999 високосным. ### Response: def is_leap(): year = 1999 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
98,970,496
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; }
28,083,338
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();
730,540
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 8700-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(8700));
### Instruction: JavaScript тілінде 1-ден 8700-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(8700));
60,105,964
en
Java
logic_ops
advanced
Write logic to check if the year 2075 is a leap year in Java.
public bool IsLeap() { int y = 2075; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2075 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2075; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,546,904
en
JavaScript
var_decl
beginner
How to declare a variable limit with value 786104 in JavaScript?
let limit = 786104;
### Instruction: How to declare a variable limit with value 786104 in JavaScript? ### Response: let limit = 786104;
68,162,333
ru
C#
array_ops
intermediate
Напишите на C# функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на C# функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
696,705
ru
Python
sum_n
intermediate
Напиши функцию на Python, которая считает сумму чисел от 1 до 5742.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(5742))
### Instruction: Напиши функцию на Python, которая считает сумму чисел от 1 до 5742. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(5742))
24,004,558
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; }
3,889,176
kk
Python
var_decl
beginner
Python тілінде 916049 мәнімен timer айнымалысын қалай жариялауға болады?
timer = 916049
### Instruction: Python тілінде 916049 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: timer = 916049
78,124,536
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(); }
85,338,701
en
C#
array_ops
intermediate
Write a function that reverses a list in C#.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in C#. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
3,698,787
ru
C#
var_decl
beginner
Как объявить переменную health со значением 970791 в C#?
int health = 970791;
### Instruction: Как объявить переменную health со значением 970791 в C#? ### Response: int health = 970791;
53,642,566
kk
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; }
91,285,213
kk
C++
logic_ops
intermediate
C++ тилінде 1922 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1922; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1922 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1922; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
55,254,087
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 412 простым.
function isPrime() { let n = 412; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 412 простым. ### Response: function isPrime() { let n = 412; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
35,450,115
kk
Python
string_ops
intermediate
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
def is_palindrome(s): return s == s[::-1]
### Instruction: Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: def is_palindrome(s): return s == s[::-1]
72,849,577
en
Python
logic_ops
advanced
Write logic to check if the year 1924 is a leap year in Python.
def is_leap(): year = 1924 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1924 is a leap year in Python. ### Response: def is_leap(): year = 1924 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
2,328,418
kk
Unity
var_decl
beginner
Unity тілінде 695203 мәнімен level айнымалысын қалай жариялауға болады?
int level = 695203;
### Instruction: Unity тілінде 695203 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 695203;
24,810,332
kk
C++
string_ops
intermediate
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
4,976,984
ru
C++
var_decl
beginner
Как объявить переменную offset со значением 252849 в C++?
int offset = 252849;
### Instruction: Как объявить переменную offset со значением 252849 в C++? ### Response: int offset = 252849;
46,763,380
en
Java
logic_ops
intermediate
Write a function that determines if the number 285 is prime in Java.
public bool IsPrime() { int n = 285; 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 285 is prime in Java. ### Response: public bool IsPrime() { int n = 285; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,115,690
kk
Python
factorial
advanced
Python тілінде 5060 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(5060))
### Instruction: Python тілінде 5060 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(5060))
43,210,094
kk
C#
string_ops
advanced
C# тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: C# тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
220,173
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 469.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(469));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 469. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(469));
1,230,479
en
Python
var_decl
beginner
How to declare a variable limit with value 328450 in Python?
limit = 328450
### Instruction: How to declare a variable limit with value 328450 in Python? ### Response: limit = 328450
33,536,848
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; }
44,702,152
en
Unity
array_ops
intermediate
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; }
2,508,526
en
C++
var_decl
beginner
How to declare a variable buffer with value 402804 in C++?
int buffer = 402804;
### Instruction: How to declare a variable buffer with value 402804 in C++? ### Response: int buffer = 402804;
45,571,186
kk
JavaScript
array_ops
intermediate
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
50,596,427
ru
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; }
19,361,456
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; }
68,421,344
en
Java
array_ops
intermediate
Write a function that finds the maximum number in an array in Java.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in Java. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
4,179,203
ru
Java
var_decl
beginner
Как объявить переменную value со значением 217592 в Java?
int value = 217592;
### Instruction: Как объявить переменную value со значением 217592 в Java? ### Response: int value = 217592;
170,331
kk
Python
factorial
advanced
Python тілінде 9556 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(9556))
### Instruction: Python тілінде 9556 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(9556))
551,415
en
C++
var_decl
beginner
How to declare a variable weight with value 633329 in C++?
int weight = 633329;
### Instruction: How to declare a variable weight with value 633329 in C++? ### Response: int weight = 633329;
49,577,929
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 1918 високосным.
public bool IsLeap() { int y = 1918; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1918 високосным. ### Response: public bool IsLeap() { int y = 1918; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
699,072
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 5944-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(5944));
### Instruction: JavaScript тілінде 1-ден 5944-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(5944));
4,323,552
en
C#
var_decl
beginner
How to declare a variable offset with value 714861 in C#?
int offset = 714861;
### Instruction: How to declare a variable offset with value 714861 in C#? ### Response: int offset = 714861;
1,213,149
kk
Unity
var_decl
beginner
Unity тілінде 609759 мәнімен health айнымалысын қалай жариялауға болады?
int health = 609759;
### Instruction: Unity тілінде 609759 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 609759;
41,448,168
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 401 простым.
public bool IsPrime() { int n = 401; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 401 простым. ### Response: public bool IsPrime() { int n = 401; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
55,945,900
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; }
4,073,490
kk
Python
var_decl
beginner
Python тілінде 148690 мәнімен score айнымалысын қалай жариялауға болады?
score = 148690
### Instruction: Python тілінде 148690 мәнімен score айнымалысын қалай жариялауға болады? ### Response: score = 148690
39,445,382
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('');
66,896,602
kk
Python
logic_ops
intermediate
Python тилінде 394 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 394 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 394 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 394 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
18,149,846
kk
Java
logic_ops
advanced
Java тилінде 2014 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2014; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 2014 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2014; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,970,704
en
Unity
var_decl
beginner
How to declare a variable x with value 421596 in Unity?
int x = 421596;
### Instruction: How to declare a variable x with value 421596 in Unity? ### Response: int x = 421596;
2,525,846
ru
Python
var_decl
beginner
Как объявить переменную limit со значением 705677 в Python?
limit = 705677
### Instruction: Как объявить переменную limit со значением 705677 в Python? ### Response: limit = 705677
4,625,167
ru
JavaScript
var_decl
beginner
Как объявить переменную data со значением 469924 в JavaScript?
let data = 469924;
### Instruction: Как объявить переменную data со значением 469924 в JavaScript? ### Response: let data = 469924;
81,916,848
en
C#
array_ops
advanced
Write a function that reverses a list in C#.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in C#. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
75,562,656
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(); }
99,839,410
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; }
1,371,589
kk
Python
var_decl
beginner
Python тілінде 349451 мәнімен total айнымалысын қалай жариялауға болады?
total = 349451
### Instruction: Python тілінде 349451 мәнімен total айнымалысын қалай жариялауға болады? ### Response: total = 349451
90,416,541
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; }
20,361,354
en
Java
logic_ops
intermediate
Write logic to check if the year 2025 is a leap year in Java.
public bool IsLeap() { int y = 2025; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2025 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2025; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
85,335,387
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 2096 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2096; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2096 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2096; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
82,430,511
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; }
51,919,240
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); }
79,343,953
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; }
99,305,649
kk
Java
logic_ops
intermediate
Java тилінде 2036 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2036; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 2036 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2036; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
37,623,716
ru
Unity
array_ops
advanced
Напишите на Unity функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Unity функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
654,840
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 1039.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(1039))
### Instruction: Write a function in Python that sums numbers from 1 to 1039. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(1039))
92,054,814
en
Python
array_ops
intermediate
Write a function that reverses a list in Python.
def reverse_list(arr): return arr[::-1]
### Instruction: Write a function that reverses a list in Python. ### Response: def reverse_list(arr): return arr[::-1]
265,461
kk
Python
sum_n
intermediate
Python тілінде 1-ден 6804-ге дейінгі сандардың қосындысын есептейтін функция жаз.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(6804))
### Instruction: Python тілінде 1-ден 6804-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(6804))
365,395
en
Python
var_decl
beginner
How to declare a variable amount with value 517078 in Python?
amount = 517078
### Instruction: How to declare a variable amount with value 517078 in Python? ### Response: amount = 517078
1,846,313
en
Python
var_decl
beginner
How to declare a variable count with value 540039 in Python?
count = 540039
### Instruction: How to declare a variable count with value 540039 in Python? ### Response: count = 540039
99,675,849
kk
Java
logic_ops
intermediate
Java тилінде 2008 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2008; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 2008 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2008; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
96,779,454
kk
Unity
array_ops
advanced
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; }
46,269,997
ru
C++
string_ops
intermediate
Напишите на C++ функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на C++ функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
43,667,514
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();