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
280,856
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 967.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(967));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 967. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(967));
30,167,310
en
Unity
logic_ops
advanced
Write a function that determines if the number 178 is prime in Unity.
public bool IsPrime() { int n = 178; 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 178 is prime in Unity. ### Response: public bool IsPrime() { int n = 178; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
16,471
kk
Unity
factorial
advanced
Unity тілінде 8409 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(8409)); }
### Instruction: Unity тілінде 8409 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(8409)); }
29,931,596
kk
Python
string_ops
advanced
Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
89,032,561
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 272 простым.
public bool IsPrime() { int n = 272; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 272 простым. ### Response: public bool IsPrime() { int n = 272; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,691,880
kk
Java
var_decl
beginner
Java тілінде 609193 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 609193;
### Instruction: Java тілінде 609193 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 609193;
4,760,472
en
Java
var_decl
beginner
How to declare a variable x with value 56339 in Java?
int x = 56339;
### Instruction: How to declare a variable x with value 56339 in Java? ### Response: int x = 56339;
29,564,186
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 2059 високосным.
public bool IsLeap() { int y = 2059; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2059 високосным. ### Response: public bool IsLeap() { int y = 2059; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
256,940
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 703.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(703));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 703. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(703));
3,592,892
kk
Java
var_decl
beginner
Java тілінде 143165 мәнімен index айнымалысын қалай жариялауға болады?
int index = 143165;
### Instruction: Java тілінде 143165 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 143165;
76,491,045
en
C++
string_ops
advanced
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(); }
1,426,375
en
Python
var_decl
beginner
How to declare a variable data with value 432470 in Python?
data = 432470
### Instruction: How to declare a variable data with value 432470 in Python? ### Response: data = 432470
1,487,551
kk
C#
var_decl
beginner
C# тілінде 541732 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 541732;
### Instruction: C# тілінде 541732 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 541732;
29,171,843
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(); }
524,370
en
C#
sum_n
intermediate
Write a function in C# that sums numbers from 1 to 4701.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4701));
### Instruction: Write a function in C# that sums numbers from 1 to 4701. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4701));
1,565,726
en
Unity
var_decl
beginner
How to declare a variable value with value 382242 in Unity?
int value = 382242;
### Instruction: How to declare a variable value with value 382242 in Unity? ### Response: int value = 382242;
1,588,091
kk
Python
var_decl
beginner
Python тілінде 187204 мәнімен level айнымалысын қалай жариялауға болады?
level = 187204
### Instruction: Python тілінде 187204 мәнімен level айнымалысын қалай жариялауға болады? ### Response: level = 187204
65,056,366
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(); }
68,629,168
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
84,404,484
en
Python
logic_ops
advanced
Write a function that determines if the number 186 is prime in Python.
def is_prime(): n = 186 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 186 is prime in Python. ### Response: def is_prime(): n = 186 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
4,154,543
ru
Python
var_decl
beginner
Как объявить переменную buffer со значением 605053 в Python?
buffer = 605053
### Instruction: Как объявить переменную buffer со значением 605053 в Python? ### Response: buffer = 605053
3,180,401
ru
Unity
var_decl
beginner
Как объявить переменную x со значением 147535 в Unity?
int x = 147535;
### Instruction: Как объявить переменную x со значением 147535 в Unity? ### Response: int x = 147535;
68,016,140
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 197 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 197; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 197 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 197; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
480,797
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 568.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(568));
### Instruction: Write a function in Java that sums numbers from 1 to 568. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(568));
3,081,295
ru
JavaScript
var_decl
beginner
Как объявить переменную total со значением 86127 в JavaScript?
let total = 86127;
### Instruction: Как объявить переменную total со значением 86127 в JavaScript? ### Response: let total = 86127;
18,281,261
en
Unity
logic_ops
intermediate
Write logic to check if the year 1969 is a leap year in Unity.
public bool IsLeap() { int y = 1969; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1969 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1969; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,489,379
en
C++
var_decl
beginner
How to declare a variable index with value 504326 in C++?
int index = 504326;
### Instruction: How to declare a variable index with value 504326 in C++? ### Response: int index = 504326;
1,139,277
ru
C++
var_decl
beginner
Как объявить переменную rate со значением 14333 в C++?
int rate = 14333;
### Instruction: Как объявить переменную rate со значением 14333 в C++? ### Response: int rate = 14333;
46,984,172
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; }
15,563,606
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
4,177,035
en
Java
var_decl
beginner
How to declare a variable weight with value 199298 in Java?
int weight = 199298;
### Instruction: How to declare a variable weight with value 199298 in Java? ### Response: int weight = 199298;
4,782,959
ru
C#
var_decl
beginner
Как объявить переменную speed со значением 412555 в C#?
int speed = 412555;
### Instruction: Как объявить переменную speed со значением 412555 в C#? ### Response: int speed = 412555;
44,762,690
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; }
4,961,633
en
Java
var_decl
beginner
How to declare a variable limit with value 799080 in Java?
int limit = 799080;
### Instruction: How to declare a variable limit with value 799080 in Java? ### Response: int limit = 799080;
2,209,904
ru
Java
var_decl
beginner
Как объявить переменную level со значением 454450 в Java?
int level = 454450;
### Instruction: Как объявить переменную level со значением 454450 в Java? ### Response: int level = 454450;
2,470,991
ru
C#
var_decl
beginner
Как объявить переменную result со значением 536322 в C#?
int result = 536322;
### Instruction: Как объявить переменную result со значением 536322 в C#? ### Response: int result = 536322;
96,724,711
en
Python
logic_ops
advanced
Write a function that determines if the number 239 is prime in Python.
def is_prime(): n = 239 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 239 is prime in Python. ### Response: def is_prime(): n = 239 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
511,684
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 4466.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(4466));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 4466. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(4466));
2,878,931
en
C++
var_decl
beginner
How to declare a variable x with value 588957 in C++?
int x = 588957;
### Instruction: How to declare a variable x with value 588957 in C++? ### Response: int x = 588957;
1,196,360
ru
Unity
var_decl
beginner
Как объявить переменную speed со значением 15786 в Unity?
int speed = 15786;
### Instruction: Как объявить переменную speed со значением 15786 в Unity? ### Response: int speed = 15786;
4,370,189
en
C#
var_decl
beginner
How to declare a variable index with value 42980 in C#?
int index = 42980;
### Instruction: How to declare a variable index with value 42980 in C#? ### Response: int index = 42980;
65,403,425
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 253 простым.
def is_prime(): n = 253 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 253 простым. ### Response: def is_prime(): n = 253 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
24,705,331
en
C#
array_ops
intermediate
Write a function that finds the maximum number in an array in C#.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in C#. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
767,227
ru
JavaScript
var_decl
beginner
Как объявить переменную data со значением 760228 в JavaScript?
let data = 760228;
### Instruction: Как объявить переменную data со значением 760228 в JavaScript? ### Response: let data = 760228;
4,667,675
en
C++
var_decl
beginner
How to declare a variable level with value 561074 in C++?
int level = 561074;
### Instruction: How to declare a variable level with value 561074 in C++? ### Response: int level = 561074;
47,897,196
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
69,937,071
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(); }
35,143,213
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 178 простым.
public bool IsPrime() { int n = 178; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 178 простым. ### Response: public bool IsPrime() { int n = 178; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
36,765,420
ru
C#
array_ops
intermediate
Напишите на C# функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на C# функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
35,157,917
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; }
774,565
ru
JavaScript
var_decl
beginner
Как объявить переменную y со значением 436073 в JavaScript?
let y = 436073;
### Instruction: Как объявить переменную y со значением 436073 в JavaScript? ### Response: let y = 436073;
93,131,470
en
C++
logic_ops
intermediate
Write logic to check if the year 1951 is a leap year in C++.
public bool IsLeap() { int y = 1951; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1951 is a leap year in C++. ### Response: public bool IsLeap() { int y = 1951; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
47,444,713
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('');
3,326,259
en
Java
var_decl
beginner
How to declare a variable y with value 34905 in Java?
int y = 34905;
### Instruction: How to declare a variable y with value 34905 in Java? ### Response: int y = 34905;
58,469,075
en
Java
string_ops
intermediate
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; }
28,649,793
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 280 простым.
public bool IsPrime() { int n = 280; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 280 простым. ### Response: public bool IsPrime() { int n = 280; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
94,968,672
kk
C++
logic_ops
advanced
C++ тилінде 340 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 340; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 340 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 340; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
819,561
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 5969.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(5969)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 5969. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(5969)); }
1,504,867
kk
C#
var_decl
beginner
C# тілінде 532353 мәнімен count айнымалысын қалай жариялауға болады?
int count = 532353;
### Instruction: C# тілінде 532353 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 532353;
27,410,799
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; }
3,636,098
en
JavaScript
var_decl
beginner
How to declare a variable offset with value 636223 in JavaScript?
let offset = 636223;
### Instruction: How to declare a variable offset with value 636223 in JavaScript? ### Response: let offset = 636223;
86,366,488
en
Python
array_ops
advanced
Write a function that filters only even numbers from a list in Python.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Write a function that filters only even numbers from a list in Python. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
53,569,679
ru
Unity
string_ops
intermediate
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,828,224
en
Python
var_decl
beginner
How to declare a variable y with value 188952 in Python?
y = 188952
### Instruction: How to declare a variable y with value 188952 in Python? ### Response: y = 188952
80,886,789
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); }
1,094,926
kk
C#
var_decl
beginner
C# тілінде 110381 мәнімен x айнымалысын қалай жариялауға болады?
int x = 110381;
### Instruction: C# тілінде 110381 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 110381;
475,595
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 3864.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(3864));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 3864. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(3864));
12,888,877
kk
C++
logic_ops
intermediate
C++ тилінде 1963 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1963; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1963 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1963; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
26,955,869
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 1979 високосным.
public bool IsLeap() { int y = 1979; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1979 високосным. ### Response: public bool IsLeap() { int y = 1979; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
96,429,036
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(); }
45,758,381
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; }
80,642,592
en
C#
logic_ops
advanced
Write logic to check if the year 1912 is a leap year in C#.
public bool IsLeap() { int y = 1912; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1912 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1912; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,785,570
ru
Python
var_decl
beginner
Как объявить переменную health со значением 700869 в Python?
health = 700869
### Instruction: Как объявить переменную health со значением 700869 в Python? ### Response: health = 700869
923,709
en
Python
var_decl
beginner
How to declare a variable rate with value 441210 in Python?
rate = 441210
### Instruction: How to declare a variable rate with value 441210 in Python? ### Response: rate = 441210
3,969,972
kk
C++
var_decl
beginner
C++ тілінде 475160 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 475160;
### Instruction: C++ тілінде 475160 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 475160;
72,378,127
en
C++
logic_ops
intermediate
Write a function that determines if the number 120 is prime in C++.
public bool IsPrime() { int n = 120; 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 120 is prime in C++. ### Response: public bool IsPrime() { int n = 120; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
57,844,411
en
Unity
logic_ops
advanced
Write logic to check if the year 1917 is a leap year in Unity.
public bool IsLeap() { int y = 1917; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1917 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1917; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
25,507,248
kk
C#
logic_ops
intermediate
C# тилінде 2052 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2052; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2052 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2052; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
38,491,005
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
91,360,181
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
25,187,009
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 2018 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2018; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2018 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2018; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
30,184,455
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; }
4,364,939
en
C++
var_decl
beginner
How to declare a variable size with value 454444 in C++?
int size = 454444;
### Instruction: How to declare a variable size with value 454444 in C++? ### Response: int size = 454444;
34,362,235
en
Unity
string_ops
intermediate
Write a function that checks if a string is a palindrome in Unity.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Unity. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
3,529,580
en
C++
var_decl
beginner
How to declare a variable speed with value 876462 in C++?
int speed = 876462;
### Instruction: How to declare a variable speed with value 876462 in C++? ### Response: int speed = 876462;
46,003,443
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 64 простым.
public bool IsPrime() { int n = 64; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 64 простым. ### Response: public bool IsPrime() { int n = 64; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
76,094,606
en
C++
string_ops
advanced
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; }
3,174,603
kk
JavaScript
var_decl
beginner
JavaScript тілінде 470740 мәнімен data айнымалысын қалай жариялауға болады?
let data = 470740;
### Instruction: JavaScript тілінде 470740 мәнімен data айнымалысын қалай жариялауға болады? ### Response: let data = 470740;
65,585,378
ru
Java
string_ops
intermediate
Напишите на Java функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на Java функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
2,059,210
kk
C++
var_decl
beginner
C++ тілінде 585754 мәнімен result айнымалысын қалай жариялауға болады?
int result = 585754;
### Instruction: C++ тілінде 585754 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 585754;
147,069
kk
Python
factorial
advanced
Python тілінде 2933 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(2933))
### Instruction: Python тілінде 2933 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(2933))
31,888,537
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(); }
55,694,031
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 324 is prime in JavaScript.
function isPrime() { let n = 324; 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 324 is prime in JavaScript. ### Response: function isPrime() { let n = 324; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
64,165,742
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; }
905,745
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 6635.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6635)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 6635. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6635)); }
1,966,855
en
Java
var_decl
beginner
How to declare a variable offset with value 577908 in Java?
int offset = 577908;
### Instruction: How to declare a variable offset with value 577908 in Java? ### Response: int offset = 577908;
2,331,357
en
Java
var_decl
beginner
How to declare a variable weight with value 527890 in Java?
int weight = 527890;
### Instruction: How to declare a variable weight with value 527890 in Java? ### Response: int weight = 527890;
69,988,782
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; }
3,939,124
kk
C#
var_decl
beginner
C# тілінде 392509 мәнімен y айнымалысын қалай жариялауға болады?
int y = 392509;
### Instruction: C# тілінде 392509 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 392509;
42,794,856
kk
C#
array_ops
advanced
C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }