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
596,594
ru
JavaScript
factorial
advanced
Напиши функцию на JavaScript, которая вычисляет факториал числа 4771.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(4771));
### Instruction: Напиши функцию на JavaScript, которая вычисляет факториал числа 4771. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(4771));
88,947,523
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(); }
4,873,624
en
C#
var_decl
beginner
How to declare a variable value with value 558988 in C#?
int value = 558988;
### Instruction: How to declare a variable value with value 558988 in C#? ### Response: int value = 558988;
32,142,466
en
C#
string_ops
intermediate
Write a function that counts vowels in a text in C#.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in C#. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
94,672,723
en
Unity
logic_ops
advanced
Write a function that determines if the number 431 is prime in Unity.
public bool IsPrime() { int n = 431; 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 431 is prime in Unity. ### Response: public bool IsPrime() { int n = 431; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
54,669,869
kk
Java
string_ops
advanced
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
46,229,370
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); }
3,281,902
ru
Python
var_decl
beginner
Как объявить переменную data со значением 839173 в Python?
data = 839173
### Instruction: Как объявить переменную data со значением 839173 в Python? ### Response: data = 839173
493,174
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 138.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(138));
### Instruction: Write a function in JavaScript that calculates the factorial of 138. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(138));
38,596,736
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аеёиоуыэюя')
4,160,602
en
C++
var_decl
beginner
How to declare a variable weight with value 447590 in C++?
int weight = 447590;
### Instruction: How to declare a variable weight with value 447590 in C++? ### Response: int weight = 447590;
1,956,511
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 3162.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(3162));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 3162. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(3162));
87,577,143
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]
4,708,176
en
C++
var_decl
beginner
How to declare a variable y with value 728511 in C++?
int y = 728511;
### Instruction: How to declare a variable y with value 728511 in C++? ### Response: int y = 728511;
84,623,405
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; }
80,379,793
ru
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);
422,527
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 7798.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(7798));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 7798. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(7798));
13,558,566
en
Java
logic_ops
advanced
Write a function that determines if the number 163 is prime in Java.
public bool IsPrime() { int n = 163; 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 163 is prime in Java. ### Response: public bool IsPrime() { int n = 163; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
31,645,556
en
C#
logic_ops
intermediate
Write a function that determines if the number 372 is prime in C#.
public bool IsPrime() { int n = 372; 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 372 is prime in C#. ### Response: public bool IsPrime() { int n = 372; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,891,503
ru
C++
var_decl
beginner
Как объявить переменную count со значением 673979 в C++?
int count = 673979;
### Instruction: Как объявить переменную count со значением 673979 в C++? ### Response: int count = 673979;
4,725,772
en
Python
var_decl
beginner
How to declare a variable offset with value 627986 in Python?
offset = 627986
### Instruction: How to declare a variable offset with value 627986 in Python? ### Response: offset = 627986
2,091,256
kk
JavaScript
var_decl
beginner
JavaScript тілінде 767031 мәнімен weight айнымалысын қалай жариялауға болады?
let weight = 767031;
### Instruction: JavaScript тілінде 767031 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: let weight = 767031;
77,937,365
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; }
3,670,513
kk
C#
var_decl
beginner
C# тілінде 785183 мәнімен data айнымалысын қалай жариялауға болады?
int data = 785183;
### Instruction: C# тілінде 785183 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 785183;
73,136,028
kk
Java
string_ops
advanced
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; }
36,458,975
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; }
16,915,038
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
75,644,231
kk
Python
logic_ops
advanced
Python тилінде 2086 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2086 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2086 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2086 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
19,332,751
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; }
1,393,921
kk
Python
var_decl
beginner
Python тілінде 85726 мәнімен speed айнымалысын қалай жариялауға болады?
speed = 85726
### Instruction: Python тілінде 85726 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: speed = 85726
3,287,153
kk
Unity
var_decl
beginner
Unity тілінде 423795 мәнімен level айнымалысын қалай жариялауға болады?
int level = 423795;
### Instruction: Unity тілінде 423795 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 423795;
12,400,709
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 2024 високосным.
public bool IsLeap() { int y = 2024; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2024 високосным. ### Response: public bool IsLeap() { int y = 2024; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,250,617
kk
Python
var_decl
beginner
Python тілінде 750364 мәнімен timer айнымалысын қалай жариялауға болады?
timer = 750364
### Instruction: Python тілінде 750364 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: timer = 750364
73,241,240
kk
JavaScript
string_ops
intermediate
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
311,646
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 4234.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(4234));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 4234. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(4234));
64,915,333
ru
C++
array_ops
intermediate
Напишите на 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; }
33,822,617
ru
Java
string_ops
advanced
Напишите на Java функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Java функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
85,359,333
en
C++
string_ops
intermediate
Write a function that counts vowels in a text in C++.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in C++. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
61,510,707
kk
Unity
logic_ops
advanced
Unity тилінде 72 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 72; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 72 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 72; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
426,486
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 7042-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(7042));
### Instruction: JavaScript тілінде 1-ден 7042-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(7042));
16,425,999
en
Unity
logic_ops
advanced
Write logic to check if the year 1988 is a leap year in Unity.
public bool IsLeap() { int y = 1988; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1988 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1988; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
22,431,875
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; }
29,758,898
kk
Python
string_ops
advanced
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
58,193,598
ru
Python
array_ops
advanced
Напишите на Python функцию, которая фильтрует только четные числа из списка.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Напишите на Python функцию, которая фильтрует только четные числа из списка. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
71,149,656
en
Python
array_ops
intermediate
Write a function that filters only even numbers from a list in Python.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Write a function that filters only even numbers from a list in Python. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
62,551,948
en
JavaScript
string_ops
advanced
Write a function that checks if a string is a palindrome in JavaScript.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Write a function that checks if a string is a palindrome in JavaScript. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
46,750,230
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; }
330,765
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 6701.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6701)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 6701. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6701)); }
28,389,978
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 2067 високосным.
public bool IsLeap() { int y = 2067; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 2067 високосным. ### Response: public bool IsLeap() { int y = 2067; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,926,810
kk
C#
var_decl
beginner
C# тілінде 784872 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 784872;
### Instruction: C# тілінде 784872 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 784872;
93,857,664
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; }
85,703,507
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('');
4,645,339
ru
Unity
var_decl
beginner
Как объявить переменную data со значением 992989 в Unity?
int data = 992989;
### Instruction: Как объявить переменную data со значением 992989 в Unity? ### Response: int data = 992989;
51,581,922
kk
Unity
array_ops
intermediate
Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
2,449,523
kk
C#
var_decl
beginner
C# тілінде 237870 мәнімен x айнымалысын қалай жариялауға болады?
int x = 237870;
### Instruction: C# тілінде 237870 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 237870;
75,663,231
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); }
4,084,929
en
Python
var_decl
beginner
How to declare a variable offset with value 83324 in Python?
offset = 83324
### Instruction: How to declare a variable offset with value 83324 in Python? ### Response: offset = 83324
318,911
kk
Java
var_decl
beginner
Java тілінде 388831 мәнімен level айнымалысын қалай жариялауға болады?
int level = 388831;
### Instruction: Java тілінде 388831 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 388831;
83,022
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 7474.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(7474));
### Instruction: Write a function in Java that sums numbers from 1 to 7474. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(7474));
3,351,963
ru
C++
var_decl
beginner
Как объявить переменную weight со значением 233218 в C++?
int weight = 233218;
### Instruction: Как объявить переменную weight со значением 233218 в C++? ### Response: int weight = 233218;
51,403,574
kk
C#
logic_ops
advanced
C# тилінде 44 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 44; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 44 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 44; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
94,748,434
en
Python
array_ops
advanced
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]
1,507,897
ru
JavaScript
var_decl
beginner
Как объявить переменную buffer со значением 996523 в JavaScript?
let buffer = 996523;
### Instruction: Как объявить переменную buffer со значением 996523 в JavaScript? ### Response: let buffer = 996523;
27,982
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 2206.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2206)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 2206. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2206)); }
1,656,557
kk
Unity
var_decl
beginner
Unity тілінде 788854 мәнімен x айнымалысын қалай жариялауға болады?
int x = 788854;
### Instruction: Unity тілінде 788854 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 788854;
15,334,264
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; }
1,650,452
kk
C++
var_decl
beginner
C++ тілінде 198685 мәнімен total айнымалысын қалай жариялауға болады?
int total = 198685;
### Instruction: C++ тілінде 198685 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 198685;
33,079,040
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 1972 високосным.
public bool IsLeap() { int y = 1972; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1972 високосным. ### Response: public bool IsLeap() { int y = 1972; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,913,067
ru
Java
var_decl
beginner
Как объявить переменную rate со значением 878193 в Java?
int rate = 878193;
### Instruction: Как объявить переменную rate со значением 878193 в Java? ### Response: int rate = 878193;
22,046,424
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; }
927,866
ru
Python
sum_n
intermediate
Напиши функцию на Python, которая считает сумму чисел от 1 до 2406.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(2406))
### Instruction: Напиши функцию на Python, которая считает сумму чисел от 1 до 2406. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(2406))
482,149
ru
C#
var_decl
beginner
Как объявить переменную index со значением 483876 в C#?
int index = 483876;
### Instruction: Как объявить переменную index со значением 483876 в C#? ### Response: int index = 483876;
90,865,797
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); }
3,646,282
ru
C#
var_decl
beginner
Как объявить переменную weight со значением 842716 в C#?
int weight = 842716;
### Instruction: Как объявить переменную weight со значением 842716 в C#? ### Response: int weight = 842716;
36,922,365
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 400 is prime in JavaScript.
function isPrime() { let n = 400; 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 400 is prime in JavaScript. ### Response: function isPrime() { let n = 400; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
41,535,177
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(); }
35,626,490
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; }
2,163,149
en
C#
var_decl
beginner
How to declare a variable index with value 77512 in C#?
int index = 77512;
### Instruction: How to declare a variable index with value 77512 in C#? ### Response: int index = 77512;
46,411,267
ru
Java
string_ops
intermediate
Напишите на Java функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Java функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
64,176,232
kk
Unity
logic_ops
advanced
Unity тилінде 2080 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2080; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2080 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2080; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
16,182,811
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(); }
4,560,841
en
Java
var_decl
beginner
How to declare a variable count with value 235380 in Java?
int count = 235380;
### Instruction: How to declare a variable count with value 235380 in Java? ### Response: int count = 235380;
2,521,956
ru
C++
var_decl
beginner
Как объявить переменную limit со значением 847427 в C++?
int limit = 847427;
### Instruction: Как объявить переменную limit со значением 847427 в C++? ### Response: int limit = 847427;
2,277,961
ru
C++
var_decl
beginner
Как объявить переменную timer со значением 129141 в C++?
int timer = 129141;
### Instruction: Как объявить переменную timer со значением 129141 в C++? ### Response: int timer = 129141;
41,508,533
en
C#
logic_ops
intermediate
Write logic to check if the year 1973 is a leap year in C#.
public bool IsLeap() { int y = 1973; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1973 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1973; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
63,545,124
en
Unity
array_ops
advanced
Write a function that finds the maximum number in an array in Unity.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in Unity. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
43,463,337
en
JavaScript
logic_ops
advanced
Write logic to check if the year 2100 is a leap year in JavaScript.
function isLeap() { let y = 2100; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2100 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2100; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
35,975,216
en
Python
array_ops
advanced
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]
55,079,596
kk
Java
logic_ops
intermediate
Java тилінде 1954 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1954; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1954 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1954; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
724,652
kk
Java
factorial
advanced
Java тілінде 6618 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(6618));
### Instruction: Java тілінде 6618 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(6618));
2,845,034
kk
Java
var_decl
beginner
Java тілінде 762607 мәнімен total айнымалысын қалай жариялауға болады?
int total = 762607;
### Instruction: Java тілінде 762607 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 762607;
1,423,535
ru
Python
var_decl
beginner
Как объявить переменную weight со значением 328341 в Python?
weight = 328341
### Instruction: Как объявить переменную weight со значением 328341 в Python? ### Response: weight = 328341
890,411
kk
Unity
var_decl
beginner
Unity тілінде 980456 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 980456;
### Instruction: Unity тілінде 980456 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 980456;
42,203,103
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;
928,210
en
C#
var_decl
beginner
How to declare a variable score with value 577681 in C#?
int score = 577681;
### Instruction: How to declare a variable score with value 577681 in C#? ### Response: int score = 577681;
12,015,798
en
C#
logic_ops
intermediate
Write logic to check if the year 2068 is a leap year in C#.
public bool IsLeap() { int y = 2068; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2068 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2068; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
947,963
ru
C++
var_decl
beginner
Как объявить переменную data со значением 763029 в C++?
int data = 763029;
### Instruction: Как объявить переменную data со значением 763029 в C++? ### Response: int data = 763029;
65,063,232
ru
Python
array_ops
advanced
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
35,561,794
en
Java
logic_ops
intermediate
Write logic to check if the year 1974 is a leap year in Java.
public bool IsLeap() { int y = 1974; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1974 is a leap year in Java. ### Response: public bool IsLeap() { int y = 1974; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
376,137
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 6500-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6500)); }
### Instruction: Unity тілінде 1-ден 6500-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6500)); }