id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
624,965
kk
Java
sum_n
intermediate
Java тілінде 1-ден 711-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(711));
### Instruction: Java тілінде 1-ден 711-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(711));
30,938,342
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 478 is prime in JavaScript.
function isPrime() { let n = 478; 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 478 is prime in JavaScript. ### Response: function isPrime() { let n = 478; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
38,648,930
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(); }
3,989,845
kk
C++
var_decl
beginner
C++ тілінде 95592 мәнімен value айнымалысын қалай жариялауға болады?
int value = 95592;
### Instruction: C++ тілінде 95592 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 95592;
4,166,955
en
Python
var_decl
beginner
How to declare a variable score with value 784725 in Python?
score = 784725
### Instruction: How to declare a variable score with value 784725 in Python? ### Response: score = 784725
287,952
kk
Java
factorial
advanced
Java тілінде 4496 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(4496));
### Instruction: Java тілінде 4496 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(4496));
24,260,659
kk
Java
array_ops
advanced
Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
29,309,266
kk
Unity
logic_ops
advanced
Unity тилінде 426 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 426; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 426 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 426; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
91,840,014
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); }
43,252,717
en
JavaScript
string_ops
intermediate
Write a function that counts vowels in a text in JavaScript.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Write a function that counts vowels in a text in JavaScript. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
48,576,208
kk
Java
logic_ops
advanced
Java тилінде 382 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 382; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 382 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 382; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
68,516,115
kk
C++
array_ops
advanced
C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
77,146,942
kk
Java
array_ops
intermediate
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
97,521,708
en
JavaScript
logic_ops
advanced
Write logic to check if the year 1989 is a leap year in JavaScript.
function isLeap() { let y = 1989; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1989 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1989; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
167,151
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 2260.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(2260));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 2260. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(2260));
21,348,653
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; }
55,632,478
ru
Python
array_ops
advanced
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
57,822,556
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 8 простым.
public bool IsPrime() { int n = 8; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 8 простым. ### Response: public bool IsPrime() { int n = 8; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
19,522,991
en
Unity
array_ops
intermediate
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); }
10,182,651
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(); }
410,597
en
C++
var_decl
beginner
How to declare a variable offset with value 840110 in C++?
int offset = 840110;
### Instruction: How to declare a variable offset with value 840110 in C++? ### Response: int offset = 840110;
91,025,344
kk
Python
array_ops
intermediate
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
77,778,028
en
JavaScript
array_ops
intermediate
Write a function that reverses a list in JavaScript.
const reverseArr = arr => arr.reverse();
### Instruction: Write a function that reverses a list in JavaScript. ### Response: const reverseArr = arr => arr.reverse();
4,341,578
en
JavaScript
var_decl
beginner
How to declare a variable index with value 973361 in JavaScript?
let index = 973361;
### Instruction: How to declare a variable index with value 973361 in JavaScript? ### Response: let index = 973361;
4,104,223
kk
Python
var_decl
beginner
Python тілінде 345076 мәнімен amount айнымалысын қалай жариялауға болады?
amount = 345076
### Instruction: Python тілінде 345076 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: amount = 345076
57,752,039
kk
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]
92,255,277
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; }
79,915,782
ru
Java
string_ops
intermediate
Напишите на Java функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на Java функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
1,376,108
en
Java
var_decl
beginner
How to declare a variable score with value 445088 in Java?
int score = 445088;
### Instruction: How to declare a variable score with value 445088 in Java? ### Response: int score = 445088;
1,732,415
en
Python
var_decl
beginner
How to declare a variable buffer with value 382641 in Python?
buffer = 382641
### Instruction: How to declare a variable buffer with value 382641 in Python? ### Response: buffer = 382641
85,009,905
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(); }
2,315,466
kk
Unity
var_decl
beginner
Unity тілінде 133539 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 133539;
### Instruction: Unity тілінде 133539 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 133539;
26,574,343
kk
Java
logic_ops
intermediate
Java тилінде 2080 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2080; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 2080 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2080; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
16,917,702
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; }
36,749,475
ru
Unity
logic_ops
intermediate
Напишите на Unity логику проверки, является ли год 2021 високосным.
public bool IsLeap() { int y = 2021; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2021 високосным. ### Response: public bool IsLeap() { int y = 2021; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
55,922,571
en
Unity
logic_ops
advanced
Write a function that determines if the number 165 is prime in Unity.
public bool IsPrime() { int n = 165; 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 165 is prime in Unity. ### Response: public bool IsPrime() { int n = 165; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
37,090,608
ru
C#
array_ops
advanced
Напишите на C# функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на C# функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
1,566,963
en
C#
var_decl
beginner
How to declare a variable score with value 291261 in C#?
int score = 291261;
### Instruction: How to declare a variable score with value 291261 in C#? ### Response: int score = 291261;
3,562,212
en
Python
var_decl
beginner
How to declare a variable limit with value 516548 in Python?
limit = 516548
### Instruction: How to declare a variable limit with value 516548 in Python? ### Response: limit = 516548
2,278,589
kk
Java
var_decl
beginner
Java тілінде 782163 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 782163;
### Instruction: Java тілінде 782163 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 782163;
2,433,683
ru
Unity
var_decl
beginner
Как объявить переменную level со значением 439430 в Unity?
int level = 439430;
### Instruction: Как объявить переменную level со значением 439430 в Unity? ### Response: int level = 439430;
63,541,082
kk
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; }
4,523,205
en
Unity
var_decl
beginner
How to declare a variable limit with value 735555 in Unity?
int limit = 735555;
### Instruction: How to declare a variable limit with value 735555 in Unity? ### Response: int limit = 735555;
921,383
ru
C#
var_decl
beginner
Как объявить переменную score со значением 947939 в C#?
int score = 947939;
### Instruction: Как объявить переменную score со значением 947939 в C#? ### Response: int score = 947939;
370,224
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 8561.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(8561) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 8561. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(8561) << std::endl;
69,480,222
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); }
2,515,513
ru
JavaScript
var_decl
beginner
Как объявить переменную score со значением 902987 в JavaScript?
let score = 902987;
### Instruction: Как объявить переменную score со значением 902987 в JavaScript? ### Response: let score = 902987;
44,043,961
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 113 простым.
public bool IsPrime() { int n = 113; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 113 простым. ### Response: public bool IsPrime() { int n = 113; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
38,582,668
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 439 простым.
public bool IsPrime() { int n = 439; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 439 простым. ### Response: public bool IsPrime() { int n = 439; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
147,860
ru
Python
var_decl
beginner
Как объявить переменную amount со значением 828829 в Python?
amount = 828829
### Instruction: Как объявить переменную amount со значением 828829 в Python? ### Response: amount = 828829
31,396,225
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,229,075
kk
C#
array_ops
advanced
C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
13,244,007
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(); }
2,054,512
en
Java
var_decl
beginner
How to declare a variable rate with value 506474 in Java?
int rate = 506474;
### Instruction: How to declare a variable rate with value 506474 in Java? ### Response: int rate = 506474;
3,755,288
en
Python
var_decl
beginner
How to declare a variable timer with value 182589 in Python?
timer = 182589
### Instruction: How to declare a variable timer with value 182589 in Python? ### Response: timer = 182589
93,936,251
kk
C++
logic_ops
advanced
C++ тилінде 1925 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1925; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1925 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1925; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
57,287
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 5590.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5590)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 5590. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5590)); }
771,655
en
C#
var_decl
beginner
How to declare a variable limit with value 571249 in C#?
int limit = 571249;
### Instruction: How to declare a variable limit with value 571249 in C#? ### Response: int limit = 571249;
2,774,461
ru
Python
var_decl
beginner
Как объявить переменную rate со значением 398816 в Python?
rate = 398816
### Instruction: Как объявить переменную rate со значением 398816 в Python? ### Response: rate = 398816
61,910,056
en
C++
array_ops
advanced
Write a function that filters only even numbers from a list in C++.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in C++. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
2,393,312
en
C#
var_decl
beginner
How to declare a variable speed with value 361531 in C#?
int speed = 361531;
### Instruction: How to declare a variable speed with value 361531 in C#? ### Response: int speed = 361531;
65,281,726
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 1944 високосным.
def is_leap(): year = 1944 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1944 високосным. ### Response: def is_leap(): year = 1944 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
1,125,155
kk
Python
var_decl
beginner
Python тілінде 356730 мәнімен rate айнымалысын қалай жариялауға болады?
rate = 356730
### Instruction: Python тілінде 356730 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: rate = 356730
91,604,032
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
3,371,168
kk
Java
var_decl
beginner
Java тілінде 825984 мәнімен total айнымалысын қалай жариялауға болады?
int total = 825984;
### Instruction: Java тілінде 825984 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 825984;
1,703,247
kk
JavaScript
var_decl
beginner
JavaScript тілінде 957542 мәнімен total айнымалысын қалай жариялауға болады?
let total = 957542;
### Instruction: JavaScript тілінде 957542 мәнімен total айнымалысын қалай жариялауға болады? ### Response: let total = 957542;
92,932,859
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; }
86,645,340
kk
C#
logic_ops
advanced
C# тилінде 83 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 83; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 83 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 83; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,333,461
ru
JavaScript
var_decl
beginner
Как объявить переменную score со значением 570646 в JavaScript?
let score = 570646;
### Instruction: Как объявить переменную score со значением 570646 в JavaScript? ### Response: let score = 570646;
88,655,267
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);
1,476,890
en
JavaScript
var_decl
beginner
How to declare a variable offset with value 482895 in JavaScript?
let offset = 482895;
### Instruction: How to declare a variable offset with value 482895 in JavaScript? ### Response: let offset = 482895;
29,655,587
kk
Unity
logic_ops
intermediate
Unity тилінде 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: Unity тилінде 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; }
375,213
kk
Unity
var_decl
beginner
Unity тілінде 284927 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 284927;
### Instruction: Unity тілінде 284927 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 284927;
895,075
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 7203.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7203) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 7203. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7203) << std::endl;
4,830,850
ru
Java
var_decl
beginner
Как объявить переменную timer со значением 257512 в Java?
int timer = 257512;
### Instruction: Как объявить переменную timer со значением 257512 в Java? ### Response: int timer = 257512;
136,438
kk
C#
factorial
advanced
C# тілінде 5350 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5350));
### Instruction: C# тілінде 5350 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5350));
4,781,003
en
Java
var_decl
beginner
How to declare a variable size with value 200882 in Java?
int size = 200882;
### Instruction: How to declare a variable size with value 200882 in Java? ### Response: int size = 200882;
62,545,009
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; }
43,730,899
en
Python
logic_ops
intermediate
Write a function that determines if the number 321 is prime in Python.
def is_prime(): n = 321 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 321 is prime in Python. ### Response: def is_prime(): n = 321 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
93,974,069
kk
C++
logic_ops
intermediate
C++ тилінде 1998 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1998; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1998 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1998; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,847,817
ru
Java
var_decl
beginner
Как объявить переменную timer со значением 813651 в Java?
int timer = 813651;
### Instruction: Как объявить переменную timer со значением 813651 в Java? ### Response: int timer = 813651;
1,160,550
en
C++
var_decl
beginner
How to declare a variable score with value 251872 in C++?
int score = 251872;
### Instruction: How to declare a variable score with value 251872 in C++? ### Response: int score = 251872;
595,791
kk
Java
factorial
advanced
Java тілінде 936 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(936));
### Instruction: Java тілінде 936 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(936));
3,125,964
en
C++
var_decl
beginner
How to declare a variable data with value 649121 in C++?
int data = 649121;
### Instruction: How to declare a variable data with value 649121 in C++? ### Response: int data = 649121;
1,317,048
en
Java
var_decl
beginner
How to declare a variable offset with value 553866 in Java?
int offset = 553866;
### Instruction: How to declare a variable offset with value 553866 in Java? ### Response: int offset = 553866;
37,091,933
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 132 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 132; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 132 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 132; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
4,382,572
kk
Python
var_decl
beginner
Python тілінде 970555 мәнімен buffer айнымалысын қалай жариялауға болады?
buffer = 970555
### Instruction: Python тілінде 970555 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: buffer = 970555
1,617,632
kk
Unity
var_decl
beginner
Unity тілінде 289416 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 289416;
### Instruction: Unity тілінде 289416 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 289416;
42,564,651
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 1922 is a leap year in JavaScript.
function isLeap() { let y = 1922; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1922 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1922; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
3,103,747
en
Java
var_decl
beginner
How to declare a variable count with value 122388 in Java?
int count = 122388;
### Instruction: How to declare a variable count with value 122388 in Java? ### Response: int count = 122388;
1,049,239
kk
Java
var_decl
beginner
Java тілінде 496838 мәнімен score айнымалысын қалай жариялауға болады?
int score = 496838;
### Instruction: Java тілінде 496838 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 496838;
2,334,202
kk
C#
var_decl
beginner
C# тілінде 145540 мәнімен data айнымалысын қалай жариялауға болады?
int data = 145540;
### Instruction: C# тілінде 145540 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 145540;
66,520,765
en
Java
array_ops
advanced
Write a function that finds the maximum number in an array in Java.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in Java. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
77,091,834
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; }
46,889,594
en
C++
logic_ops
advanced
Write logic to check if the year 2011 is a leap year in C++.
public bool IsLeap() { int y = 2011; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2011 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2011; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
306,581
en
JavaScript
var_decl
beginner
How to declare a variable index with value 214495 in JavaScript?
let index = 214495;
### Instruction: How to declare a variable index with value 214495 in JavaScript? ### Response: let index = 214495;
42,868,988
en
Unity
string_ops
intermediate
Write a function that counts vowels in a text in Unity.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Unity. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
3,822,517
ru
JavaScript
var_decl
beginner
Как объявить переменную level со значением 543982 в JavaScript?
let level = 543982;
### Instruction: Как объявить переменную level со значением 543982 в JavaScript? ### Response: let level = 543982;
4,304,398
kk
Java
var_decl
beginner
Java тілінде 856876 мәнімен value айнымалысын қалай жариялауға болады?
int value = 856876;
### Instruction: Java тілінде 856876 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 856876;
407,220
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 2187.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(2187));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 2187. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(2187));