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 |
|---|---|---|---|---|---|---|---|
92,308,074 | kk | Unity | array_ops | advanced | Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
4,553,006 | ru | C++ | var_decl | beginner | Как объявить переменную health со значением 178479 в C++? | int health = 178479; | ### Instruction:
Как объявить переменную health со значением 178479 в C++?
### Response:
int health = 178479; |
371,017 | en | Java | sum_n | intermediate | Write a function in Java that sums numbers from 1 to 2376. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(2376)); | ### Instruction:
Write a function in Java that sums numbers from 1 to 2376.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(2376)); |
222,418 | ru | Java | var_decl | beginner | Как объявить переменную level со значением 955254 в Java? | int level = 955254; | ### Instruction:
Как объявить переменную level со значением 955254 в Java?
### Response:
int level = 955254; |
73,975,230 | kk | Python | logic_ops | intermediate | Python тилінде 216 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 216
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 216 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 216
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
1,475,778 | ru | Python | var_decl | beginner | Как объявить переменную index со значением 147265 в Python? | index = 147265 | ### Instruction:
Как объявить переменную index со значением 147265 в Python?
### Response:
index = 147265 |
1,256,285 | en | Java | var_decl | beginner | How to declare a variable result with value 392765 in Java? | int result = 392765; | ### Instruction:
How to declare a variable result with value 392765 in Java?
### Response:
int result = 392765; |
11,327,445 | kk | Python | logic_ops | advanced | Python тилінде 2036 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 2036
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 2036 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 2036
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
72,781,866 | 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;
} |
267,188 | ru | C++ | var_decl | beginner | Как объявить переменную result со значением 746509 в C++? | int result = 746509; | ### Instruction:
Как объявить переменную result со значением 746509 в C++?
### Response:
int result = 746509; |
89,344,742 | kk | C++ | array_ops | intermediate | C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
98,502,842 | en | Java | logic_ops | advanced | Write a function that determines if the number 183 is prime in Java. | public bool IsPrime() {
int n = 183;
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 183 is prime in Java.
### Response:
public bool IsPrime() {
int n = 183;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
81,287,633 | 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;
} |
23,180,079 | 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();
} |
2,147,811 | kk | Python | var_decl | beginner | Python тілінде 230193 мәнімен y айнымалысын қалай жариялауға болады? | y = 230193 | ### Instruction:
Python тілінде 230193 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
y = 230193 |
27,795,879 | 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);
} |
91,588,496 | ru | C# | logic_ops | intermediate | Напишите на C# функцию, определяющую, является ли число 270 простым. | public bool IsPrime() {
int n = 270;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 270 простым.
### Response:
public bool IsPrime() {
int n = 270;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
81,899,503 | kk | Java | logic_ops | advanced | Java тилінде 2073 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2073;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 2073 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2073;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
43,259,907 | en | JavaScript | string_ops | intermediate | Write a function that checks if a string is a palindrome in JavaScript. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
Write a function that checks if a string is a palindrome in JavaScript.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
14,328,691 | en | C# | logic_ops | advanced | Write a function that determines if the number 84 is prime in C#. | public bool IsPrime() {
int n = 84;
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 84 is prime in C#.
### Response:
public bool IsPrime() {
int n = 84;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,738,362 | ru | Java | var_decl | beginner | Как объявить переменную weight со значением 963751 в Java? | int weight = 963751; | ### Instruction:
Как объявить переменную weight со значением 963751 в Java?
### Response:
int weight = 963751; |
4,487,347 | en | C++ | var_decl | beginner | How to declare a variable limit with value 138117 in C++? | int limit = 138117; | ### Instruction:
How to declare a variable limit with value 138117 in C++?
### Response:
int limit = 138117; |
335,961 | kk | C# | var_decl | beginner | C# тілінде 175395 мәнімен index айнымалысын қалай жариялауға болады? | int index = 175395; | ### Instruction:
C# тілінде 175395 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
int index = 175395; |
95,169,835 | en | Java | string_ops | advanced | Write a function that converts a string to uppercase in Java. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in Java.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
52,625,263 | kk | C# | logic_ops | intermediate | C# тилінде 2033 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2033;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 2033 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2033;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
87,209,974 | 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] |
41,365,352 | ru | C++ | logic_ops | intermediate | Напишите на C++ логику проверки, является ли год 1935 високосным. | public bool IsLeap() {
int y = 1935;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 1935 високосным.
### Response:
public bool IsLeap() {
int y = 1935;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
87,932,047 | 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;
} |
286,966 | en | Java | var_decl | beginner | How to declare a variable size with value 263529 in Java? | int size = 263529; | ### Instruction:
How to declare a variable size with value 263529 in Java?
### Response:
int size = 263529; |
2,033,450 | kk | Unity | var_decl | beginner | Unity тілінде 250842 мәнімен total айнымалысын қалай жариялауға болады? | int total = 250842; | ### Instruction:
Unity тілінде 250842 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
int total = 250842; |
50,423,579 | kk | Unity | array_ops | advanced | Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
2,528,847 | kk | C++ | var_decl | beginner | C++ тілінде 308024 мәнімен weight айнымалысын қалай жариялауға болады? | int weight = 308024; | ### Instruction:
C++ тілінде 308024 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
int weight = 308024; |
3,249,329 | kk | C# | var_decl | beginner | C# тілінде 292407 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 292407; | ### Instruction:
C# тілінде 292407 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 292407; |
46,666,980 | kk | Java | string_ops | advanced | Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
40,408,790 | ru | JavaScript | string_ops | advanced | Напишите на JavaScript функцию, которая переводит строку в верхний регистр. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
### Response:
const toUpper = s => s.toUpperCase(); |
3,191,293 | kk | Unity | var_decl | beginner | Unity тілінде 624514 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 624514; | ### Instruction:
Unity тілінде 624514 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 624514; |
1,172,925 | ru | Java | var_decl | beginner | Как объявить переменную index со значением 808418 в Java? | int index = 808418; | ### Instruction:
Как объявить переменную index со значением 808418 в Java?
### Response:
int index = 808418; |
18,064,269 | kk | Java | logic_ops | intermediate | Java тилінде 433 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 433;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 433 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 433;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
30,558,202 | 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(''); |
73,951,033 | en | C++ | logic_ops | intermediate | Write a function that determines if the number 213 is prime in C++. | public bool IsPrime() {
int n = 213;
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 213 is prime in C++.
### Response:
public bool IsPrime() {
int n = 213;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
1,820,902 | en | Python | var_decl | beginner | How to declare a variable timer with value 696992 in Python? | timer = 696992 | ### Instruction:
How to declare a variable timer with value 696992 in Python?
### Response:
timer = 696992 |
4,395,126 | ru | C# | var_decl | beginner | Как объявить переменную rate со значением 835379 в C#? | int rate = 835379; | ### Instruction:
Как объявить переменную rate со значением 835379 в C#?
### Response:
int rate = 835379; |
43,141,047 | kk | C# | string_ops | intermediate | C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
100,216 | en | C++ | sum_n | intermediate | Write a function in C++ that sums numbers from 1 to 8156. | 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(8156) << std::endl; | ### Instruction:
Write a function in C++ that sums numbers from 1 to 8156.
### 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(8156) << std::endl; |
96,348,625 | en | C# | logic_ops | advanced | Write logic to check if the year 2038 is a leap year in C#. | public bool IsLeap() {
int y = 2038;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2038 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 2038;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
10,626,240 | kk | Python | string_ops | advanced | Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') | ### Instruction:
Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') |
91,032,737 | en | JavaScript | logic_ops | intermediate | Write logic to check if the year 1901 is a leap year in JavaScript. | function isLeap() {
let y = 1901;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 1901 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 1901;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
1,937,113 | ru | C# | var_decl | beginner | Как объявить переменную y со значением 944542 в C#? | int y = 944542; | ### Instruction:
Как объявить переменную y со значением 944542 в C#?
### Response:
int y = 944542; |
76,640,157 | en | Unity | logic_ops | advanced | Write a function that determines if the number 352 is prime in Unity. | public bool IsPrime() {
int n = 352;
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 352 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 352;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,975,156 | kk | Java | var_decl | beginner | Java тілінде 403105 мәнімен health айнымалысын қалай жариялауға болады? | int health = 403105; | ### Instruction:
Java тілінде 403105 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
int health = 403105; |
84,782,990 | ru | Python | array_ops | intermediate | Напишите на Python функцию, которая разворачивает список задом наперед. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Напишите на Python функцию, которая разворачивает список задом наперед.
### Response:
def reverse_list(arr):
return arr[::-1] |
83,244,053 | en | Unity | array_ops | intermediate | 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;
} |
27,780,723 | kk | 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;
} |
646,549 | kk | Python | sum_n | intermediate | Python тілінде 1-ден 3489-ге дейінгі сандардың қосындысын есептейтін функция жаз. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(3489)) | ### Instruction:
Python тілінде 1-ден 3489-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(3489)) |
452,340 | en | Java | factorial | advanced | Write a function in Java that calculates the factorial of 8316. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(8316)); | ### Instruction:
Write a function in Java that calculates the factorial of 8316.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(8316)); |
94,294,682 | kk | Java | array_ops | intermediate | 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;
} |
31,716,231 | kk | JavaScript | array_ops | advanced | JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
42,318,521 | 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(''); |
39,990,254 | en | C# | logic_ops | advanced | Write logic to check if the year 1984 is a leap year in C#. | public bool IsLeap() {
int y = 1984;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1984 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 1984;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
72,527,379 | en | Java | array_ops | intermediate | Write a function that reverses a list in Java. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Write a function that reverses a list in Java.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
846,663 | en | JavaScript | sum_n | intermediate | Write a function in JavaScript that sums numbers from 1 to 7055. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(7055)); | ### Instruction:
Write a function in JavaScript that sums numbers from 1 to 7055.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(7055)); |
42,396,545 | en | Java | array_ops | advanced | Write a function that reverses a list in Java. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Write a function that reverses a list in Java.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
4,177,618 | ru | Python | var_decl | beginner | Как объявить переменную total со значением 366855 в Python? | total = 366855 | ### Instruction:
Как объявить переменную total со значением 366855 в Python?
### Response:
total = 366855 |
62,670,000 | kk | JavaScript | array_ops | advanced | JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | const reverseArr = arr => arr.reverse(); | ### Instruction:
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
const reverseArr = arr => arr.reverse(); |
3,780,692 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 448948 мәнімен offset айнымалысын қалай жариялауға болады? | let offset = 448948; | ### Instruction:
JavaScript тілінде 448948 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
let offset = 448948; |
52,585,954 | ru | Unity | array_ops | intermediate | Напишите на Unity функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на Unity функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
92,583,981 | 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;
} |
19,037,128 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | const getMax = arr => Math.max(...arr); | ### Instruction:
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
const getMax = arr => Math.max(...arr); |
38,380,436 | 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();
} |
107,058 | en | C# | sum_n | intermediate | Write a function in C# that sums numbers from 1 to 6653. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(6653)); | ### Instruction:
Write a function in C# that sums numbers from 1 to 6653.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(6653)); |
36,913,834 | kk | C++ | string_ops | intermediate | C++ тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
C++ тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
4,276,686 | kk | C# | var_decl | beginner | C# тілінде 390448 мәнімен offset айнымалысын қалай жариялауға болады? | int offset = 390448; | ### Instruction:
C# тілінде 390448 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
int offset = 390448; |
4,637,837 | ru | C# | var_decl | beginner | Как объявить переменную limit со значением 186652 в C#? | int limit = 186652; | ### Instruction:
Как объявить переменную limit со значением 186652 в C#?
### Response:
int limit = 186652; |
4,915,072 | en | JavaScript | var_decl | beginner | How to declare a variable size with value 108227 in JavaScript? | let size = 108227; | ### Instruction:
How to declare a variable size with value 108227 in JavaScript?
### Response:
let size = 108227; |
86,339,509 | en | Unity | logic_ops | intermediate | Write a function that determines if the number 103 is prime in Unity. | public bool IsPrime() {
int n = 103;
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 103 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 103;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
1,025,194 | ru | Python | var_decl | beginner | Как объявить переменную speed со значением 735085 в Python? | speed = 735085 | ### Instruction:
Как объявить переменную speed со значением 735085 в Python?
### Response:
speed = 735085 |
77,683,014 | kk | 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;
} |
80,374,670 | 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();
} |
44,445,151 | en | Unity | logic_ops | advanced | Write a function that determines if the number 34 is prime in Unity. | public bool IsPrime() {
int n = 34;
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 34 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 34;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,198,813 | en | Python | var_decl | beginner | How to declare a variable index with value 983900 in Python? | index = 983900 | ### Instruction:
How to declare a variable index with value 983900 in Python?
### Response:
index = 983900 |
20,261,975 | ru | Python | logic_ops | intermediate | Напишите на Python логику проверки, является ли год 1994 високосным. | def is_leap():
year = 1994
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 1994 високосным.
### Response:
def is_leap():
year = 1994
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
25,420,156 | 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;
} |
395,175 | en | C# | sum_n | intermediate | Write a function in C# that sums numbers from 1 to 8175. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(8175)); | ### Instruction:
Write a function in C# that sums numbers from 1 to 8175.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(8175)); |
77,272,848 | kk | Unity | logic_ops | advanced | Unity тилінде 383 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 383;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 383 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 383;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
99,649,539 | ru | JavaScript | string_ops | intermediate | Напишите на JavaScript функцию, которая переводит строку в верхний регистр. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
### Response:
const toUpper = s => s.toUpperCase(); |
22,589,001 | en | Python | logic_ops | advanced | Write a function that determines if the number 103 is prime in Python. | def is_prime():
n = 103
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 103 is prime in Python.
### Response:
def is_prime():
n = 103
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
67,069,188 | 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;
} |
91,121,138 | ru | Python | logic_ops | advanced | Напишите на Python логику проверки, является ли год 1941 високосным. | def is_leap():
year = 1941
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 1941 високосным.
### Response:
def is_leap():
year = 1941
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
66,138,883 | kk | C# | string_ops | advanced | C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
780,014 | en | Java | factorial | advanced | Write a function in Java that calculates the factorial of 5685. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(5685)); | ### Instruction:
Write a function in Java that calculates the factorial of 5685.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(5685)); |
1,179,557 | kk | C++ | var_decl | beginner | C++ тілінде 308089 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 308089; | ### Instruction:
C++ тілінде 308089 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 308089; |
296,416 | en | C# | sum_n | intermediate | Write a function in C# that sums numbers from 1 to 343. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(343)); | ### Instruction:
Write a function in C# that sums numbers from 1 to 343.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(343)); |
4,906,240 | ru | Java | var_decl | beginner | Как объявить переменную health со значением 4923 в Java? | int health = 4923; | ### Instruction:
Как объявить переменную health со значением 4923 в Java?
### Response:
int health = 4923; |
98,271,985 | ru | 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аеёиоуыэюя') |
14,676,598 | ru | C++ | array_ops | intermediate | Напишите на C++ функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на C++ функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
50,993,276 | 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;
} |
91,152,325 | kk | C++ | logic_ops | intermediate | C++ тилінде 1963 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1963;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 1963 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1963;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
89,470,983 | ru | Python | logic_ops | advanced | Напишите на Python логику проверки, является ли год 2081 високосным. | def is_leap():
year = 2081
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 2081 високосным.
### Response:
def is_leap():
year = 2081
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
26,874,429 | kk | Unity | logic_ops | advanced | Unity тилінде 39 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 39;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 39 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 39;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
28,494,523 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая разворачивает список задом наперед. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Напишите на Python функцию, которая разворачивает список задом наперед.
### Response:
def reverse_list(arr):
return arr[::-1] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.