id int64 | language string | prog_lang string | category string | difficulty string | instruction string | output string | text string |
|---|---|---|---|---|---|---|---|
86,041,380 | ru | Python | string_ops | advanced | Напишите на Python функцию, которая переводит строку в верхний регистр. | def to_upper(s):
return s.upper() | ### Instruction:
Напишите на Python функцию, которая переводит строку в верхний регистр.
### Response:
def to_upper(s):
return s.upper() |
26,998,808 | ru | C++ | logic_ops | intermediate | Напишите на C++ функцию, определяющую, является ли число 226 простым. | public bool IsPrime() {
int n = 226;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 226 простым.
### Response:
public bool IsPrime() {
int n = 226;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
71,983,919 | en | Python | string_ops | advanced | Write a function that checks if a string is a palindrome in Python. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Write a function that checks if a string is a palindrome in Python.
### Response:
def is_palindrome(s):
return s == s[::-1] |
3,386,379 | ru | Unity | var_decl | beginner | Как объявить переменную weight со значением 907343 в Unity? | int weight = 907343; | ### Instruction:
Как объявить переменную weight со значением 907343 в Unity?
### Response:
int weight = 907343; |
3,676,971 | ru | Unity | var_decl | beginner | Как объявить переменную buffer со значением 684100 в Unity? | int buffer = 684100; | ### Instruction:
Как объявить переменную buffer со значением 684100 в Unity?
### Response:
int buffer = 684100; |
50,289,616 | en | Java | string_ops | advanced | Write a function that checks if a string is a palindrome in Java. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Write a function that checks if a string is a palindrome in Java.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
4,775,095 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 541025 мәнімен x айнымалысын қалай жариялауға болады? | let x = 541025; | ### Instruction:
JavaScript тілінде 541025 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
let x = 541025; |
74,716,611 | 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();
} |
3,403,634 | kk | C# | var_decl | beginner | C# тілінде 416330 мәнімен x айнымалысын қалай жариялауға болады? | int x = 416330; | ### Instruction:
C# тілінде 416330 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 416330; |
4,889,097 | kk | C++ | var_decl | beginner | C++ тілінде 358879 мәнімен rate айнымалысын қалай жариялауға болады? | int rate = 358879; | ### Instruction:
C++ тілінде 358879 мәнімен rate айнымалысын қалай жариялауға болады?
### Response:
int rate = 358879; |
3,199,045 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 204928 мәнімен buffer айнымалысын қалай жариялауға болады? | let buffer = 204928; | ### Instruction:
JavaScript тілінде 204928 мәнімен buffer айнымалысын қалай жариялауға болады?
### Response:
let buffer = 204928; |
4,211,316 | en | C++ | var_decl | beginner | How to declare a variable level with value 145529 in C++? | int level = 145529; | ### Instruction:
How to declare a variable level with value 145529 in C++?
### Response:
int level = 145529; |
96,820,731 | ru | Python | logic_ops | intermediate | Напишите на Python логику проверки, является ли год 2014 високосным. | def is_leap():
year = 2014
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 2014 високосным.
### Response:
def is_leap():
year = 2014
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
1,350,509 | kk | Java | var_decl | beginner | Java тілінде 955779 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 955779; | ### Instruction:
Java тілінде 955779 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 955779; |
1,023,235 | kk | C++ | sum_n | intermediate | C++ тілінде 1-ден 4374-ге дейінгі сандардың қосындысын есептейтін функция жаз. | 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(4374) << std::endl; | ### Instruction:
C++ тілінде 1-ден 4374-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### 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(4374) << std::endl; |
66,459,351 | kk | C++ | logic_ops | intermediate | C++ тилінде 146 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 146;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C++ тилінде 146 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 146;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,142,969 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 117879 мәнімен size айнымалысын қалай жариялауға болады? | let size = 117879; | ### Instruction:
JavaScript тілінде 117879 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
let size = 117879; |
21,363,454 | en | Unity | logic_ops | intermediate | Write logic to check if the year 2017 is a leap year in Unity. | public bool IsLeap() {
int y = 2017;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2017 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 2017;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
261,217 | en | Unity | factorial | advanced | Write a function in Unity that calculates the factorial of 5873. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(5873));
} | ### Instruction:
Write a function in Unity that calculates the factorial of 5873.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(5873));
} |
97,330,910 | 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();
} |
67,825,641 | 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();
} |
21,861,728 | kk | C# | logic_ops | advanced | C# тилінде 343 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 343;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C# тилінде 343 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 343;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
28,585,617 | 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;
} |
44,278,104 | 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;
} |
92,407,666 | ru | 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;
} |
2,849,892 | ru | C++ | var_decl | beginner | Как объявить переменную limit со значением 787741 в C++? | int limit = 787741; | ### Instruction:
Как объявить переменную limit со значением 787741 в C++?
### Response:
int limit = 787741; |
23,750,994 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая разворачивает список задом наперед. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
### Response:
const reverseArr = arr => arr.reverse(); |
94,672,336 | 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;
} |
95,959,558 | 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] |
67,648,825 | kk | Java | logic_ops | advanced | Java тилінде 330 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 330;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 330 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 330;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
1,660,358 | kk | C# | var_decl | beginner | C# тілінде 602050 мәнімен data айнымалысын қалай жариялауға болады? | int data = 602050; | ### Instruction:
C# тілінде 602050 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 602050; |
67,146,588 | en | Unity | array_ops | advanced | Write a function that filters only even numbers from a list in 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:
Write a function that filters only even numbers from a list in 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;
} |
68,189,497 | kk | JavaScript | array_ops | advanced | JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | const reverseArr = arr => arr.reverse(); | ### Instruction:
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
const reverseArr = arr => arr.reverse(); |
49,907,105 | kk | Python | array_ops | intermediate | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
1,405,588 | ru | C# | var_decl | beginner | Как объявить переменную health со значением 56248 в C#? | int health = 56248; | ### Instruction:
Как объявить переменную health со значением 56248 в C#?
### Response:
int health = 56248; |
23,563,775 | 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] |
707,737 | ru | JavaScript | var_decl | beginner | Как объявить переменную score со значением 915170 в JavaScript? | let score = 915170; | ### Instruction:
Как объявить переменную score со значением 915170 в JavaScript?
### Response:
let score = 915170; |
73,678,929 | 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);
} |
97,883,314 | kk | JavaScript | string_ops | intermediate | JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
4,995,753 | en | C++ | var_decl | beginner | How to declare a variable index with value 365389 in C++? | int index = 365389; | ### Instruction:
How to declare a variable index with value 365389 in C++?
### Response:
int index = 365389; |
93,712,059 | 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();
} |
41,744,748 | en | Java | array_ops | advanced | Write a function that filters only even numbers from a list in 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:
Write a function that filters only even numbers from a list in 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;
} |
653,374 | kk | Python | var_decl | beginner | Python тілінде 27230 мәнімен speed айнымалысын қалай жариялауға болады? | speed = 27230 | ### Instruction:
Python тілінде 27230 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
speed = 27230 |
13,241,586 | 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(''); |
77,621,866 | kk | Unity | string_ops | advanced | Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
73,302,785 | 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();
} |
1,812,306 | en | Java | var_decl | beginner | How to declare a variable data with value 824669 in Java? | int data = 824669; | ### Instruction:
How to declare a variable data with value 824669 in Java?
### Response:
int data = 824669; |
49,029,009 | en | Java | string_ops | intermediate | 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;
} |
13,916,653 | kk | Python | logic_ops | intermediate | Python тилінде 2048 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 2048
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 2048 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 2048
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
1,288,727 | ru | C++ | var_decl | beginner | Как объявить переменную data со значением 792166 в C++? | int data = 792166; | ### Instruction:
Как объявить переменную data со значением 792166 в C++?
### Response:
int data = 792166; |
2,893,861 | ru | JavaScript | var_decl | beginner | Как объявить переменную weight со значением 407183 в JavaScript? | let weight = 407183; | ### Instruction:
Как объявить переменную weight со значением 407183 в JavaScript?
### Response:
let weight = 407183; |
854,589 | kk | C++ | factorial | advanced | C++ тілінде 2048 санының факториалын есептейтін функция жаз. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(2048) << std::endl; | ### Instruction:
C++ тілінде 2048 санының факториалын есептейтін функция жаз.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(2048) << std::endl; |
32,417,930 | 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);
} |
1,506,330 | ru | Unity | var_decl | beginner | Как объявить переменную amount со значением 408716 в Unity? | int amount = 408716; | ### Instruction:
Как объявить переменную amount со значением 408716 в Unity?
### Response:
int amount = 408716; |
19,698,280 | en | Python | logic_ops | intermediate | Write logic to check if the year 1915 is a leap year in Python. | def is_leap():
year = 1915
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 1915 is a leap year in Python.
### Response:
def is_leap():
year = 1915
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
96,476,698 | en | JavaScript | logic_ops | advanced | Write logic to check if the year 2076 is a leap year in JavaScript. | function isLeap() {
let y = 2076;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 2076 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 2076;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
17,666,272 | kk | JavaScript | string_ops | intermediate | JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | const toUpper = s => s.toUpperCase(); | ### Instruction:
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
const toUpper = s => s.toUpperCase(); |
4,049,334 | en | Java | var_decl | beginner | How to declare a variable count with value 318947 in Java? | int count = 318947; | ### Instruction:
How to declare a variable count with value 318947 in Java?
### Response:
int count = 318947; |
1,746,362 | en | Java | var_decl | beginner | How to declare a variable weight with value 762234 in Java? | int weight = 762234; | ### Instruction:
How to declare a variable weight with value 762234 in Java?
### Response:
int weight = 762234; |
41,104,983 | ru | Python | array_ops | intermediate | Напишите на Python функцию, которая находит максимальное число в массиве. | def get_max(arr):
return max(arr) | ### Instruction:
Напишите на Python функцию, которая находит максимальное число в массиве.
### Response:
def get_max(arr):
return max(arr) |
4,121,621 | en | Python | var_decl | beginner | How to declare a variable weight with value 748337 in Python? | weight = 748337 | ### Instruction:
How to declare a variable weight with value 748337 in Python?
### Response:
weight = 748337 |
3,596,745 | en | JavaScript | var_decl | beginner | How to declare a variable y with value 751370 in JavaScript? | let y = 751370; | ### Instruction:
How to declare a variable y with value 751370 in JavaScript?
### Response:
let y = 751370; |
52,018,278 | ru | JavaScript | string_ops | advanced | Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
73,814,710 | kk | JavaScript | string_ops | intermediate | JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
1,021,803 | kk | C# | var_decl | beginner | C# тілінде 490852 мәнімен timer айнымалысын қалай жариялауға болады? | int timer = 490852; | ### Instruction:
C# тілінде 490852 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
int timer = 490852; |
30,233,621 | 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;
} |
9,725 | kk | C++ | sum_n | intermediate | C++ тілінде 1-ден 2086-ге дейінгі сандардың қосындысын есептейтін функция жаз. | 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(2086) << std::endl; | ### Instruction:
C++ тілінде 1-ден 2086-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### 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(2086) << std::endl; |
3,692,081 | kk | Python | var_decl | beginner | Python тілінде 306640 мәнімен offset айнымалысын қалай жариялауға болады? | offset = 306640 | ### Instruction:
Python тілінде 306640 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
offset = 306640 |
50,849,437 | ru | C# | logic_ops | advanced | Напишите на C# логику проверки, является ли год 1932 високосным. | public bool IsLeap() {
int y = 1932;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 1932 високосным.
### Response:
public bool IsLeap() {
int y = 1932;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
163,716 | en | JavaScript | sum_n | intermediate | Write a function in JavaScript that sums numbers from 1 to 2485. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(2485)); | ### Instruction:
Write a function in JavaScript that sums numbers from 1 to 2485.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(2485)); |
37,235,909 | 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;
} |
96,986,207 | ru | C# | string_ops | intermediate | Напишите на C# функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на C# функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
45,923,822 | 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;
} |
311,747 | kk | Java | factorial | advanced | Java тілінде 1599 санының факториалын есептейтін функция жаз. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(1599)); | ### Instruction:
Java тілінде 1599 санының факториалын есептейтін функция жаз.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(1599)); |
372,957 | en | Python | var_decl | beginner | How to declare a variable y with value 558530 in Python? | y = 558530 | ### Instruction:
How to declare a variable y with value 558530 in Python?
### Response:
y = 558530 |
64,536,282 | 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;
} |
1,814,298 | en | Python | var_decl | beginner | How to declare a variable total with value 9982 in Python? | total = 9982 | ### Instruction:
How to declare a variable total with value 9982 in Python?
### Response:
total = 9982 |
10,291,304 | kk | Python | logic_ops | intermediate | Python тилінде 1966 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 1966
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 1966 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 1966
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
3,477,356 | kk | Java | var_decl | beginner | Java тілінде 177804 мәнімен level айнымалысын қалай жариялауға болады? | int level = 177804; | ### Instruction:
Java тілінде 177804 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
int level = 177804; |
13,485,171 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 1933 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 1933;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 1933 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 1933;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
45,928,293 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript логику проверки, является ли год 1958 високосным. | function isLeap() {
let y = 1958;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 1958 високосным.
### Response:
function isLeap() {
let y = 1958;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
1,052,024 | kk | Java | var_decl | beginner | Java тілінде 544050 мәнімен value айнымалысын қалай жариялауға болады? | int value = 544050; | ### Instruction:
Java тілінде 544050 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 544050; |
55,953,045 | en | Unity | logic_ops | advanced | Write logic to check if the year 2050 is a leap year in Unity. | public bool IsLeap() {
int y = 2050;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2050 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 2050;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
12,860,575 | 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);
} |
132,735 | kk | C# | sum_n | intermediate | C# тілінде 1-ден 895-ге дейінгі сандардың қосындысын есептейтін функция жаз. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(895)); | ### Instruction:
C# тілінде 1-ден 895-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(895)); |
57,626,452 | ru | Python | logic_ops | advanced | Напишите на Python функцию, определяющую, является ли число 290 простым. | def is_prime():
n = 290
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 290 простым.
### Response:
def is_prime():
n = 290
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
4,296,122 | kk | Java | var_decl | beginner | Java тілінде 136209 мәнімен total айнымалысын қалай жариялауға болады? | int total = 136209; | ### Instruction:
Java тілінде 136209 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
int total = 136209; |
74,840,904 | kk | Java | string_ops | intermediate | Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
1,635,716 | kk | Java | var_decl | beginner | Java тілінде 749598 мәнімен data айнымалысын қалай жариялауға болады? | int data = 749598; | ### Instruction:
Java тілінде 749598 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 749598; |
92,173,746 | 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();
} |
3,847,393 | ru | C# | var_decl | beginner | Как объявить переменную rate со значением 318982 в C#? | int rate = 318982; | ### Instruction:
Как объявить переменную rate со значением 318982 в C#?
### Response:
int rate = 318982; |
90,171,706 | kk | Python | string_ops | intermediate | 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аеёиоуыэюя') |
40,302,132 | ru | Java | logic_ops | intermediate | Напишите на Java функцию, определяющую, является ли число 249 простым. | public bool IsPrime() {
int n = 249;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 249 простым.
### Response:
public bool IsPrime() {
int n = 249;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,806,759 | en | JavaScript | var_decl | beginner | How to declare a variable level with value 915439 in JavaScript? | let level = 915439; | ### Instruction:
How to declare a variable level with value 915439 in JavaScript?
### Response:
let level = 915439; |
1,061,621 | en | Java | sum_n | intermediate | Write a function in Java that sums numbers from 1 to 4260. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(4260)); | ### Instruction:
Write a function in Java that sums numbers from 1 to 4260.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(4260)); |
2,113,348 | kk | Unity | var_decl | beginner | Unity тілінде 83994 мәнімен weight айнымалысын қалай жариялауға болады? | int weight = 83994; | ### Instruction:
Unity тілінде 83994 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
int weight = 83994; |
2,442,037 | ru | C# | var_decl | beginner | Как объявить переменную timer со значением 338156 в C#? | int timer = 338156; | ### Instruction:
Как объявить переменную timer со значением 338156 в C#?
### Response:
int timer = 338156; |
81,093,196 | en | Python | string_ops | intermediate | Write a function that converts a string to uppercase in Python. | def to_upper(s):
return s.upper() | ### Instruction:
Write a function that converts a string to uppercase in Python.
### Response:
def to_upper(s):
return s.upper() |
99,427,372 | kk | Unity | logic_ops | intermediate | Unity тилінде 359 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 359;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 359 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 359;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
56,154,134 | 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;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.