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
52,969,687
en
Java
logic_ops
intermediate
Write logic to check if the year 1932 is a leap year in Java.
public bool IsLeap() { int y = 1932; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1932 is a leap year in Java. ### Response: public bool IsLeap() { int y = 1932; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,638,729
kk
Java
var_decl
beginner
Java тілінде 233721 мәнімен result айнымалысын қалай жариялауға болады?
int result = 233721;
### Instruction: Java тілінде 233721 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 233721;
90,729,988
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;
36,917,246
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 186 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 186; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 186 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 186; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
24,992,898
en
Python
string_ops
advanced
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аеёиоуыэюя')
61,679,398
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 315 простым.
public bool IsPrime() { int n = 315; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 315 простым. ### Response: public bool IsPrime() { int n = 315; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
70,555,950
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('');
13,926,806
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 2027 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2027; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2027 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2027; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
58,677,391
en
Python
logic_ops
intermediate
Write logic to check if the year 2004 is a leap year in Python.
def is_leap(): year = 2004 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2004 is a leap year in Python. ### Response: def is_leap(): year = 2004 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
54,918,586
kk
Python
string_ops
advanced
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
def is_palindrome(s): return s == s[::-1]
### Instruction: Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: def is_palindrome(s): return s == s[::-1]
20,995,430
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 205 простым.
function isPrime() { let n = 205; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 205 простым. ### Response: function isPrime() { let n = 205; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
50,357
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 278.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(278));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 278. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(278));
3,976,194
en
Java
var_decl
beginner
How to declare a variable x with value 805531 in Java?
int x = 805531;
### Instruction: How to declare a variable x with value 805531 in Java? ### Response: int x = 805531;
3,872,558
ru
Unity
var_decl
beginner
Как объявить переменную level со значением 35723 в Unity?
int level = 35723;
### Instruction: Как объявить переменную level со значением 35723 в Unity? ### Response: int level = 35723;
389,871
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 1123-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(1123)); }
### Instruction: Unity тілінде 1-ден 1123-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(1123)); }
354,380
ru
Python
var_decl
beginner
Как объявить переменную rate со значением 291456 в Python?
rate = 291456
### Instruction: Как объявить переменную rate со значением 291456 в Python? ### Response: rate = 291456
40,584,210
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; }
71,734,359
kk
C++
logic_ops
intermediate
C++ тилінде 284 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 284; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 284 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 284; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
58,113,474
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 1900 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1900; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1900 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1900; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
13,563,734
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 34 is prime in JavaScript.
function isPrime() { let n = 34; 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 34 is prime in JavaScript. ### Response: function isPrime() { let n = 34; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
29,409,137
ru
C#
array_ops
intermediate
Напишите на C# функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на C# функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
1,586,724
en
JavaScript
var_decl
beginner
How to declare a variable size with value 407542 in JavaScript?
let size = 407542;
### Instruction: How to declare a variable size with value 407542 in JavaScript? ### Response: let size = 407542;
1,765,529
ru
Unity
var_decl
beginner
Как объявить переменную score со значением 352291 в Unity?
int score = 352291;
### Instruction: Как объявить переменную score со значением 352291 в Unity? ### Response: int score = 352291;
31,015,484
kk
Python
logic_ops
advanced
Python тилінде 2007 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2007 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2007 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2007 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
3,265,240
en
Unity
var_decl
beginner
How to declare a variable data with value 99859 in Unity?
int data = 99859;
### Instruction: How to declare a variable data with value 99859 in Unity? ### Response: int data = 99859;
98,257,289
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; }
97,002,316
en
Unity
logic_ops
intermediate
Write a function that determines if the number 99 is prime in Unity.
public bool IsPrime() { int n = 99; 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 99 is prime in Unity. ### Response: public bool IsPrime() { int n = 99; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
49,461,299
kk
Python
array_ops
intermediate
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
311,639
kk
C++
factorial
advanced
C++ тілінде 1337 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(1337) << std::endl;
### Instruction: C++ тілінде 1337 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(1337) << std::endl;
85,867,797
kk
Unity
logic_ops
intermediate
Unity тилінде 91 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 91; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 91 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 91; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
11,176,623
en
C#
string_ops
advanced
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,176,185
en
C++
logic_ops
intermediate
Write logic to check if the year 1922 is a leap year in C++.
public bool IsLeap() { int y = 1922; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1922 is a leap year in C++. ### Response: public bool IsLeap() { int y = 1922; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,533,323
en
Python
var_decl
beginner
How to declare a variable index with value 183555 in Python?
index = 183555
### Instruction: How to declare a variable index with value 183555 in Python? ### Response: index = 183555
66,259,037
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 318 простым.
public bool IsPrime() { int n = 318; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 318 простым. ### Response: public bool IsPrime() { int n = 318; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
86,877,839
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); }
993,752
en
C++
var_decl
beginner
How to declare a variable score with value 672590 in C++?
int score = 672590;
### Instruction: How to declare a variable score with value 672590 in C++? ### Response: int score = 672590;
99,606,578
ru
Unity
logic_ops
intermediate
Напишите на Unity логику проверки, является ли год 2091 високосным.
public bool IsLeap() { int y = 2091; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2091 високосным. ### Response: public bool IsLeap() { int y = 2091; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,578,868
en
Python
var_decl
beginner
How to declare a variable weight with value 913505 in Python?
weight = 913505
### Instruction: How to declare a variable weight with value 913505 in Python? ### Response: weight = 913505
2,743,820
kk
Java
var_decl
beginner
Java тілінде 150485 мәнімен health айнымалысын қалай жариялауға болады?
int health = 150485;
### Instruction: Java тілінде 150485 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 150485;
42,348,500
en
JavaScript
string_ops
intermediate
Write a function that converts a string to uppercase in JavaScript.
const toUpper = s => s.toUpperCase();
### Instruction: Write a function that converts a string to uppercase in JavaScript. ### Response: const toUpper = s => s.toUpperCase();
1,035,298
ru
Python
var_decl
beginner
Как объявить переменную score со значением 716678 в Python?
score = 716678
### Instruction: Как объявить переменную score со значением 716678 в Python? ### Response: score = 716678
2,785,719
en
Unity
var_decl
beginner
How to declare a variable weight with value 621557 in Unity?
int weight = 621557;
### Instruction: How to declare a variable weight with value 621557 in Unity? ### Response: int weight = 621557;
49,355,445
ru
C#
string_ops
advanced
Напишите на C# функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C# функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
59,343,631
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 394 is prime in JavaScript.
function isPrime() { let n = 394; 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 394 is prime in JavaScript. ### Response: function isPrime() { let n = 394; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
63,987,041
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 2094 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2094; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2094 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2094; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
11,773,672
en
C#
array_ops
advanced
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; }
68,373,575
kk
JavaScript
array_ops
intermediate
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
2,810,874
en
C#
var_decl
beginner
How to declare a variable timer with value 714947 in C#?
int timer = 714947;
### Instruction: How to declare a variable timer with value 714947 in C#? ### Response: int timer = 714947;
4,918,836
kk
C++
var_decl
beginner
C++ тілінде 459749 мәнімен score айнымалысын қалай жариялауға болады?
int score = 459749;
### Instruction: C++ тілінде 459749 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 459749;
4,495,705
kk
Java
var_decl
beginner
Java тілінде 477585 мәнімен score айнымалысын қалай жариялауға болады?
int score = 477585;
### Instruction: Java тілінде 477585 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 477585;
97,403,983
en
Java
array_ops
intermediate
Write a function that finds the maximum number in an array in Java.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in Java. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
2,589,741
ru
Java
var_decl
beginner
Как объявить переменную result со значением 312812 в Java?
int result = 312812;
### Instruction: Как объявить переменную result со значением 312812 в Java? ### Response: int result = 312812;
69,936,183
en
Unity
logic_ops
intermediate
Write logic to check if the year 2051 is a leap year in Unity.
public bool IsLeap() { int y = 2051; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2051 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 2051; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,889,488
ru
Python
var_decl
beginner
Как объявить переменную data со значением 561299 в Python?
data = 561299
### Instruction: Как объявить переменную data со значением 561299 в Python? ### Response: data = 561299
93,133,648
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; }
96,515,094
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
64,078,940
en
JavaScript
array_ops
intermediate
Write a function that filters only even numbers from a list in JavaScript.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Write a function that filters only even numbers from a list in JavaScript. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
67,404,344
kk
C++
logic_ops
advanced
C++ тилінде 1938 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1938; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1938 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1938; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
304,254
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 1697.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(1697));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 1697. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(1697));
1,441,421
kk
Unity
var_decl
beginner
Unity тілінде 917090 мәнімен result айнымалысын қалай жариялауға болады?
int result = 917090;
### Instruction: Unity тілінде 917090 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 917090;
4,981,248
ru
Python
var_decl
beginner
Как объявить переменную x со значением 937099 в Python?
x = 937099
### Instruction: Как объявить переменную x со значением 937099 в Python? ### Response: x = 937099
3,836,812
en
Java
var_decl
beginner
How to declare a variable result with value 202036 in Java?
int result = 202036;
### Instruction: How to declare a variable result with value 202036 in Java? ### Response: int result = 202036;
50,391,085
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; }
80,761,678
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; }
86,995,854
ru
Unity
array_ops
advanced
Напишите на Unity функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Unity функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
20,993,940
kk
C#
logic_ops
intermediate
C# тилінде 2084 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2084; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2084 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2084; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
44,973,711
kk
C#
logic_ops
advanced
C# тилінде 77 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 77; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 77 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 77; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
24,827,725
en
JavaScript
string_ops
intermediate
Write a function that converts a string to uppercase in JavaScript.
const toUpper = s => s.toUpperCase();
### Instruction: Write a function that converts a string to uppercase in JavaScript. ### Response: const toUpper = s => s.toUpperCase();
39,496,213
en
JavaScript
array_ops
advanced
Write a function that reverses a list in JavaScript.
const reverseArr = arr => arr.reverse();
### Instruction: Write a function that reverses a list in JavaScript. ### Response: const reverseArr = arr => arr.reverse();
9,369
kk
C#
factorial
advanced
C# тілінде 3735 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(3735));
### Instruction: C# тілінде 3735 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(3735));
370,998
en
C#
sum_n
intermediate
Write a function in C# that sums numbers from 1 to 4843.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4843));
### Instruction: Write a function in C# that sums numbers from 1 to 4843. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4843));
81,644,627
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('');
38,228,511
en
JavaScript
array_ops
advanced
Write a function that filters only even numbers from a list in JavaScript.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Write a function that filters only even numbers from a list in JavaScript. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
19,759,491
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; }
81,488,376
kk
C#
logic_ops
intermediate
C# тилінде 2090 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2090; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2090 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2090; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
43,703,651
en
Unity
string_ops
advanced
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; }
34,262,195
kk
Python
string_ops
intermediate
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
def is_palindrome(s): return s == s[::-1]
### Instruction: Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: def is_palindrome(s): return s == s[::-1]
51,293,823
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 177 простым.
public bool IsPrime() { int n = 177; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 177 простым. ### Response: public bool IsPrime() { int n = 177; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
83,562,408
ru
C#
array_ops
advanced
Напишите на C# функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на C# функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
70,557,087
kk
C++
string_ops
advanced
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
3,293,394
kk
JavaScript
var_decl
beginner
JavaScript тілінде 454076 мәнімен total айнымалысын қалай жариялауға болады?
let total = 454076;
### Instruction: JavaScript тілінде 454076 мәнімен total айнымалысын қалай жариялауға болады? ### Response: let total = 454076;
91,603,020
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; }
87,500,212
ru
Python
array_ops
advanced
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
48,234,454
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; }
86,848,012
kk
Java
array_ops
advanced
Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
13,676,484
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; }
214,063
ru
C++
sum_n
intermediate
Напиши функцию на C++, которая считает сумму чисел от 1 до 7253.
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(7253) << std::endl;
### Instruction: Напиши функцию на C++, которая считает сумму чисел от 1 до 7253. ### 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(7253) << std::endl;
1,790,565
kk
Unity
var_decl
beginner
Unity тілінде 433803 мәнімен total айнымалысын қалай жариялауға болады?
int total = 433803;
### Instruction: Unity тілінде 433803 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 433803;
604,597
en
Unity
var_decl
beginner
How to declare a variable index with value 640912 in Unity?
int index = 640912;
### Instruction: How to declare a variable index with value 640912 in Unity? ### Response: int index = 640912;
4,090,515
kk
JavaScript
var_decl
beginner
JavaScript тілінде 202759 мәнімен limit айнымалысын қалай жариялауға болады?
let limit = 202759;
### Instruction: JavaScript тілінде 202759 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: let limit = 202759;
176,650
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 8972.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(8972));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 8972. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(8972));
57,405,900
kk
C#
logic_ops
intermediate
C# тилінде 2098 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2098; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2098 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2098; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,305,942
ru
C#
var_decl
beginner
Как объявить переменную amount со значением 274843 в C#?
int amount = 274843;
### Instruction: Как объявить переменную amount со значением 274843 в C#? ### Response: int amount = 274843;
4,349,604
en
Python
var_decl
beginner
How to declare a variable offset with value 830337 in Python?
offset = 830337
### Instruction: How to declare a variable offset with value 830337 in Python? ### Response: offset = 830337
1,594,361
en
C++
var_decl
beginner
How to declare a variable size with value 646900 in C++?
int size = 646900;
### Instruction: How to declare a variable size with value 646900 in C++? ### Response: int size = 646900;
2,032,046
kk
C#
var_decl
beginner
C# тілінде 92394 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 92394;
### Instruction: C# тілінде 92394 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 92394;
16,689,342
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 211 простым.
public bool IsPrime() { int n = 211; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 211 простым. ### Response: public bool IsPrime() { int n = 211; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
58,703,700
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 1957 високосным.
public bool IsLeap() { int y = 1957; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1957 високосным. ### Response: public bool IsLeap() { int y = 1957; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
65,005
ru
JavaScript
var_decl
beginner
Как объявить переменную rate со значением 679756 в JavaScript?
let rate = 679756;
### Instruction: Как объявить переменную rate со значением 679756 в JavaScript? ### Response: let rate = 679756;
56,432,474
ru
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; }