id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
20,943,083
en
Unity
logic_ops
intermediate
Write logic to check if the year 1927 is a leap year in Unity.
public bool IsLeap() { int y = 1927; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1927 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1927; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,952,987
kk
JavaScript
var_decl
beginner
JavaScript тілінде 160091 мәнімен timer айнымалысын қалай жариялауға болады?
let timer = 160091;
### Instruction: JavaScript тілінде 160091 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: let timer = 160091;
46,088,886
ru
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; }
354,923
en
C++
var_decl
beginner
How to declare a variable level with value 934700 in C++?
int level = 934700;
### Instruction: How to declare a variable level with value 934700 in C++? ### Response: int level = 934700;
40,549,307
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 466 простым.
def is_prime(): n = 466 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 466 простым. ### Response: def is_prime(): n = 466 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
929,977
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 750.
int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(750) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 750. ### Response: int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(750) << std::endl;
1,036,240
ru
C++
sum_n
intermediate
Напиши функцию на C++, которая считает сумму чисел от 1 до 1186.
int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(1186) << std::endl;
### Instruction: Напиши функцию на C++, которая считает сумму чисел от 1 до 1186. ### Response: int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(1186) << std::endl;
63,699,369
en
Java
logic_ops
intermediate
Write logic to check if the year 2018 is a leap year in Java.
public bool IsLeap() { int y = 2018; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2018 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2018; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,680,022
kk
Java
var_decl
beginner
Java тілінде 212064 мәнімен index айнымалысын қалай жариялауға болады?
int index = 212064;
### Instruction: Java тілінде 212064 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 212064;
4,121,708
en
C++
var_decl
beginner
How to declare a variable speed with value 778120 in C++?
int speed = 778120;
### Instruction: How to declare a variable speed with value 778120 in C++? ### Response: int speed = 778120;
99,586,013
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 389 простым.
public bool IsPrime() { int n = 389; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 389 простым. ### Response: public bool IsPrime() { int n = 389; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
885,566
kk
Python
var_decl
beginner
Python тілінде 118559 мәнімен level айнымалысын қалай жариялауға болады?
level = 118559
### Instruction: Python тілінде 118559 мәнімен level айнымалысын қалай жариялауға болады? ### Response: level = 118559
20,595,071
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
76,187,531
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;
16,329,005
kk
Unity
logic_ops
advanced
Unity тилінде 2025 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2025; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2025 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2025; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
69,400,257
ru
Unity
array_ops
advanced
Напишите на 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; }
3,048,744
en
JavaScript
var_decl
beginner
How to declare a variable size with value 421937 in JavaScript?
let size = 421937;
### Instruction: How to declare a variable size with value 421937 in JavaScript? ### Response: let size = 421937;
85,210,541
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 2022 високосным.
public bool IsLeap() { int y = 2022; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2022 високосным. ### Response: public bool IsLeap() { int y = 2022; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
49,777,231
en
Python
logic_ops
advanced
Write a function that determines if the number 420 is prime in Python.
def is_prime(): n = 420 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 420 is prime in Python. ### Response: def is_prime(): n = 420 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
53,563,148
kk
C++
logic_ops
advanced
C++ тилінде 40 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 40; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 40 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 40; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
21,520,780
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('');
92,906,463
kk
C#
string_ops
intermediate
C# тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: C# тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
39,717,619
kk
Unity
array_ops
intermediate
Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
2,432,689
kk
Unity
var_decl
beginner
Unity тілінде 373629 мәнімен data айнымалысын қалай жариялауға болады?
int data = 373629;
### Instruction: Unity тілінде 373629 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 373629;
4,844,744
en
C#
var_decl
beginner
How to declare a variable index with value 25127 in C#?
int index = 25127;
### Instruction: How to declare a variable index with value 25127 in C#? ### Response: int index = 25127;
56,090
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 9452.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(9452))
### Instruction: Write a function in Python that calculates the factorial of 9452. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(9452))
38,607,756
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 2008 високосным.
public bool IsLeap() { int y = 2008; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2008 високосным. ### Response: public bool IsLeap() { int y = 2008; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
13,488,637
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 111 простым.
def is_prime(): n = 111 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 111 простым. ### Response: def is_prime(): n = 111 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
530,419
kk
C#
factorial
advanced
C# тілінде 2822 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(2822));
### Instruction: C# тілінде 2822 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(2822));
95,902,159
en
Unity
logic_ops
intermediate
Write logic to check if the year 2097 is a leap year in Unity.
public bool IsLeap() { int y = 2097; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2097 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 2097; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
99,852,144
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; }
57,357,801
en
Python
logic_ops
advanced
Write logic to check if the year 1982 is a leap year in Python.
def is_leap(): year = 1982 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1982 is a leap year in Python. ### Response: def is_leap(): year = 1982 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
73,832,197
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; }
1,063,714
ru
JavaScript
var_decl
beginner
Как объявить переменную result со значением 985522 в JavaScript?
let result = 985522;
### Instruction: Как объявить переменную result со значением 985522 в JavaScript? ### Response: let result = 985522;
21,762,552
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 138 is prime in JavaScript.
function isPrime() { let n = 138; 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 138 is prime in JavaScript. ### Response: function isPrime() { let n = 138; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
91,040,688
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; }
62,371,629
en
Python
logic_ops
advanced
Write logic to check if the year 2060 is a leap year in Python.
def is_leap(): year = 2060 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2060 is a leap year in Python. ### Response: def is_leap(): year = 2060 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
44,484,265
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(); }
95,839,414
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; }
3,263,795
ru
Java
var_decl
beginner
Как объявить переменную y со значением 774271 в Java?
int y = 774271;
### Instruction: Как объявить переменную y со значением 774271 в Java? ### Response: int y = 774271;
82,223,046
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 2038 високосным.
public bool IsLeap() { int y = 2038; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2038 високосным. ### Response: public bool IsLeap() { int y = 2038; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
99,858,418
ru
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,536,036
ru
C#
var_decl
beginner
Как объявить переменную score со значением 367641 в C#?
int score = 367641;
### Instruction: Как объявить переменную score со значением 367641 в C#? ### Response: int score = 367641;
47,267,069
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,584,906
kk
C#
var_decl
beginner
C# тілінде 792213 мәнімен result айнымалысын қалай жариялауға болады?
int result = 792213;
### Instruction: C# тілінде 792213 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 792213;
93,427,709
en
Unity
string_ops
intermediate
Write a function that converts a string to uppercase in Unity.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Unity. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
900,400
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 223-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(223) << std::endl;
### Instruction: C++ тілінде 1-ден 223-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(223) << std::endl;
49,945,136
kk
Unity
logic_ops
intermediate
Unity тилінде 407 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 407; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 407 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 407; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
329,329
kk
Python
sum_n
intermediate
Python тілінде 1-ден 7621-ге дейінгі сандардың қосындысын есептейтін функция жаз.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(7621))
### Instruction: Python тілінде 1-ден 7621-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(7621))
2,943,478
ru
JavaScript
var_decl
beginner
Как объявить переменную size со значением 323760 в JavaScript?
let size = 323760;
### Instruction: Как объявить переменную size со значением 323760 в JavaScript? ### Response: let size = 323760;
4,794,856
ru
Java
var_decl
beginner
Как объявить переменную offset со значением 301194 в Java?
int offset = 301194;
### Instruction: Как объявить переменную offset со значением 301194 в Java? ### Response: int offset = 301194;
79,070,067
kk
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]
616,673
en
Java
var_decl
beginner
How to declare a variable weight with value 648202 in Java?
int weight = 648202;
### Instruction: How to declare a variable weight with value 648202 in Java? ### Response: int weight = 648202;
24,809,827
kk
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]
42,219,532
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; }
3,479,688
ru
C#
var_decl
beginner
Как объявить переменную timer со значением 403756 в C#?
int timer = 403756;
### Instruction: Как объявить переменную timer со значением 403756 в C#? ### Response: int timer = 403756;
17,508,315
ru
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; }
13,774,842
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; }
404,989
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 848.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(848));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 848. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(848));
92,528,514
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 361 is prime in JavaScript.
function isPrime() { let n = 361; 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 361 is prime in JavaScript. ### Response: function isPrime() { let n = 361; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
19,440,481
ru
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; }
370,546
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 2630.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(2630));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 2630. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(2630));
90,274,719
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; }
48,352,630
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,681,967
ru
Unity
var_decl
beginner
Как объявить переменную amount со значением 41768 в Unity?
int amount = 41768;
### Instruction: Как объявить переменную amount со значением 41768 в Unity? ### Response: int amount = 41768;
385,557
ru
JavaScript
factorial
advanced
Напиши функцию на JavaScript, которая вычисляет факториал числа 5117.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(5117));
### Instruction: Напиши функцию на JavaScript, которая вычисляет факториал числа 5117. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(5117));
69,087,248
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 128 простым.
public bool IsPrime() { int n = 128; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 128 простым. ### Response: public bool IsPrime() { int n = 128; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
46,957,035
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]
12,027,102
ru
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; }
2,865,641
ru
Java
var_decl
beginner
Как объявить переменную y со значением 998359 в Java?
int y = 998359;
### Instruction: Как объявить переменную y со значением 998359 в Java? ### Response: int y = 998359;
45,146,665
kk
C++
logic_ops
advanced
C++ тилінде 368 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 368; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 368 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 368; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
34,725,218
en
Java
string_ops
advanced
Write a function that counts vowels in a text in Java.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Java. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
51,143,546
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript логику проверки, является ли год 1936 високосным.
function isLeap() { let y = 1936; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1936 високосным. ### Response: function isLeap() { let y = 1936; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
36,736,218
en
Python
string_ops
intermediate
Write a function that counts vowels in a text in Python.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Write a function that counts vowels in a text in Python. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
3,400,363
ru
JavaScript
var_decl
beginner
Как объявить переменную health со значением 966622 в JavaScript?
let health = 966622;
### Instruction: Как объявить переменную health со значением 966622 в JavaScript? ### Response: let health = 966622;
466,507
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 2341.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(2341));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 2341. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(2341));
25,212,531
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(); }
3,995,182
en
Unity
var_decl
beginner
How to declare a variable offset with value 925702 in Unity?
int offset = 925702;
### Instruction: How to declare a variable offset with value 925702 in Unity? ### Response: int offset = 925702;
4,309,143
en
Java
var_decl
beginner
How to declare a variable offset with value 288823 in Java?
int offset = 288823;
### Instruction: How to declare a variable offset with value 288823 in Java? ### Response: int offset = 288823;
212,703
kk
Java
factorial
advanced
Java тілінде 705 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(705));
### Instruction: Java тілінде 705 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(705));
94,277,358
en
C++
array_ops
intermediate
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; }
90,412,474
ru
Java
array_ops
intermediate
Напишите на Java функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на Java функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
551,427
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 9925.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(9925));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 9925. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(9925));
4,801,723
en
JavaScript
var_decl
beginner
How to declare a variable offset with value 580492 in JavaScript?
let offset = 580492;
### Instruction: How to declare a variable offset with value 580492 in JavaScript? ### Response: let offset = 580492;
1,696,065
en
Java
var_decl
beginner
How to declare a variable y with value 490161 in Java?
int y = 490161;
### Instruction: How to declare a variable y with value 490161 in Java? ### Response: int y = 490161;
752,360
kk
Python
var_decl
beginner
Python тілінде 491095 мәнімен count айнымалысын қалай жариялауға болады?
count = 491095
### Instruction: Python тілінде 491095 мәнімен count айнымалысын қалай жариялауға болады? ### Response: count = 491095
402,177
ru
JavaScript
factorial
advanced
Напиши функцию на JavaScript, которая вычисляет факториал числа 5027.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(5027));
### Instruction: Напиши функцию на JavaScript, которая вычисляет факториал числа 5027. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(5027));
15,085,241
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; }
2,597,942
en
Unity
var_decl
beginner
How to declare a variable score with value 574972 in Unity?
int score = 574972;
### Instruction: How to declare a variable score with value 574972 in Unity? ### Response: int score = 574972;
2,419,571
kk
JavaScript
var_decl
beginner
JavaScript тілінде 643933 мәнімен buffer айнымалысын қалай жариялауға болады?
let buffer = 643933;
### Instruction: JavaScript тілінде 643933 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: let buffer = 643933;
704,332
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 5915.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(5915)); }
### Instruction: Write a function in Unity that calculates the factorial of 5915. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(5915)); }
78,950,963
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
42,277,588
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 22 простым.
def is_prime(): n = 22 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 22 простым. ### Response: def is_prime(): n = 22 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
3,366,677
kk
C#
var_decl
beginner
C# тілінде 159571 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 159571;
### Instruction: C# тілінде 159571 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 159571;
2,260,571
ru
JavaScript
var_decl
beginner
Как объявить переменную level со значением 796875 в JavaScript?
let level = 796875;
### Instruction: Как объявить переменную level со значением 796875 в JavaScript? ### Response: let level = 796875;
58,568,351
kk
C#
logic_ops
advanced
C# тилінде 460 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 460; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 460 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 460; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
53,980,147
kk
Unity
logic_ops
advanced
Unity тилінде 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: Unity тилінде 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; }
30,535,219
ru
Unity
string_ops
intermediate
Напишите на 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; }
15,476,521
en
C#
array_ops
intermediate
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; }
59,765,465
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; }