Шаблон:Nums/tests
Перейти к навигации
Перейти к поиску
Основное предназначение шаблона {{nums}} — форматирование и вывод нескольких целых чисел, разделённых запятыми, пробелами или другими разделителями. Простейший вариант использования шаблона:
{{nums|1|12|123|1234|12345}}
- 1, 12, 123, 1234, 12 345
Существует возможность превратить числа в ссылки на статьи о числах:
Можно заменить разделитель (по умолчанию это запятая и пробел):
{{nums|1|12|123|1234|12345|x=+}}
- 1 + 12 + 123 + 1234 + 12 345
{{nums|1|12|123|1234|12345|x!=.}}
- 1.12.123.1234.12 345
Можно отдельно изменить последний разделитель:
В десятичной системе счисления [[факторион]]ами являются четыре числа: {{nums|1|2|145|40585|xx=и}}
- В десятичной системе счисления факторионами являются четыре числа: 1, 2, 145 и 40 585
Можно вывести заданный текст до и/или после каждого числа:
{{nums|1|12|123|1234|12345|prefix=<|suffix=>}}
- <1>, <12>, <123>, <1234>, <12 345>
Тесты
[править код]Базовые варианты
[править код]- 6, 28, 496, 8128, 33 550 336, 8 589 869 056
{{nums|6|28|496|8128|33550336|8589869056}}
- то же со ссылками
- 6, 28, 496, 8128, 33 550 336, 8 589 869 056
{{nums|link=yes|6|28|496|8128|33550336|8589869056}}
- то же без красных ссылок
Автоматическое форматирование чисел по ВП:Ч
[править код]- контрольный пример без пробелов на входе
- 6, 28, 496, 8128, 33 550 336, 8 589 869 056
{{nums|6|28|496|8128|33550336|8589869056}}
- контрольный пример с принятым форматированием на входе
- 6, 28, 496, 8128, 33 550 336, 8 589 869 056
{{nums|6|28|496|8128|33 550 336|8 589 869 056}}
- 6, 28, 496, 8128, 33 550 336, 8 589 869 056
{{nums|6|28|4 96|8 128|335 50 336|85898 69056}}
- то же со ссылками
- 6, 28, 496, 8128, 33 550 336, 8 589 869 056
{{nums|link=yes|6|28|4 96|8 128|335 50 336|85898 69056}}
- то же без красных ссылок
- 6, 28, 496, 8128, 33 550 336, 8 589 869 056
{{nums|6|28|4 96|8 128|335 50 336|85898 69056|link=nrl}}
Что-то поинтереснее простого перечисления
[править код]- треугольное число вплотную
- 1+2+3+4+5+6+7+8+9+10 = 55
{{nums|x!=+|1|2|3|4|5|6|7|8|9|10}} = 55
- то же со ссылками
- треугольное число с пробелами
- 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 = 55
{{nums|x=+|1|2|3|4|5|6|7|8|9|10}} = 55
- то же со ссылками
- 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 = 55
{{nums|x=+|1|2|3|4|5|6|7|8|9|10|link=yes}} = {{num1|55}}
- 2 × 3 × 5 × 7 × 11 × 13 × 17 × 19 = 9 699 690
{{nums|2|3|5|7|11|13|17|19|x=×}} = {{num1|9699690|link=no}}
- то же со ссылками
- 2 × 3 × 5 × 7 × 11 × 13 × 17 × 19 = 9 699 690
{{nums|2|3|5|7|11|13|17|19|x=×|link=yes}} = {{num1|9699690}}
Префиксы и суффиксы
[править код]- sf(4) = 1! × 2! × 3! × 4! = 288
sf(4) = {{nums|1|2|3|4|x=×|suffix=!}} = {{num1|288}}
- Сумма одинаковых степеней
- 33 + 43 + 53 = 63
{{nums|3|4|5|suffix=<sup>3</sup>|x=+}} = {{power|6|3}}
- Разные степени с одним основанием
- 103 + 104 + 105 = 1000 + 10 000 + 100 000 = 111 000
{{nums|3|4|5|prefix=10<sup>|suffix=</sup>|x=+}} = {{nums|1000|10000|100000|x=+}} = {{num|111000}}
- Сумма тетраций
- 21 + 22 + 23 + 24 = 11 + 22 + 33 + 44 = 288
{{nums|1|2|3|4|x=+|prefix=<sup>2</sup>}} = {{power|1|1}} + {{power|2|2}} + {{power|3|3}} + {{power|4|4}} = {{num1|288}}
- Кавычки зачем-то понадобились
- «23», «317», «1997»
{{nums|23|317|1997|prefix=«|suffix=»}}
- Кавычки со ссылками
natural join (параметры xx, xx!)
[править код]Простые числа, меньшие 20 — числа {{nums|2|3|5|7|11|13|17|19|xx=и}}.
- Простые числа, меньшие 20 — числа 2, 3, 5, 7, 11, 13, 17 и 19.
Простые числа, меньшие 20 — числа {{nums|2|3|5|7|11|13|17|19|xx=и|link=yes}}.
{{nums|3|4|5|6|x=+|suffix=<sup>3</sup>}}.
- 33 + 43 + 53 + 63.
{{nums|3|4|5|6|x!=+|suffix=<sup>3</sup>}}.
- 33+43+53+63.
{{nums|3|4|5|6|xx=+|suffix=<sup>3</sup>}}.
- 33, 43, 53 + 63.
{{nums|3|4|5|6|xx!=+|suffix=<sup>3</sup>}}.
- 33, 43, 53+63.
{{nums|3|4|5|6|x=+|xx={{=}}|suffix=<sup>3</sup>}}.
- 33 + 43 + 53 = 63.
{{nums|3|4|5|6|x!=+|xx!={{=}}|suffix=<sup>3</sup>}}.
- 33+43+53=63.
{{nums|3|4|5|6|x!=+|xx={{=}}|suffix=<sup>3</sup>}}.
- 33+43+53 = 63.
{{nums|3|4|5|6|x=+|xx!={{=}}|suffix=<sup>3</sup>}}.
- 33 + 43 + 53=63.
- (5, 7, 11, 13), (11, 13, 17, 19), (101, 103, 107, 109), (191, 193, 197, 199), (821, 823, 827, 829), (1481, 1483, 1487, 1489), (1871, 1873, 1877, 1879), (2081, 2083, 2087, 2089), (3251, 3253, 3257, 3259), …, (25 301, 25 303, 25 307, 25 309), …
({{nums|5|7|11|13|link=nrl|x!=, }}), ({{nums|11|13|17|19|link=nrl|x!=, }}), ({{nums|101|103|107|109|link=nrl|x!=, }}), ({{nums|191|193|197|199|link=nrl|x!=, }}), ({{nums|821|823|827|829|link=nrl|x!=, }}), ({{nums|1481|1483|1487|1489|link=nrl|x!=, }}), ({{nums|1871|1873|1877|1879|link=nrl|x!=, }}), ({{nums|2081|2083|2087|2089|link=nrl|x!=, }}), ({{nums|3251|3253|3257|3259|link=nrl|x!=, }}), …, ({{nums|25301|25303|25307|25309|x!=, }}), …
Сравнение {{nums}} и {{list}}
[править код]- Параметр
x
задан
- Параметр
x
пустой
- Параметр
x!
задан
- Параметр
x!
пустой
- Без этих параметров
Разное число параметров
[править код]- 1
- 1, 2
- 1, 2, 3
- 1, 2, 3, 4
- 1, 2, 3, 4, 5
- 1, 2, 3, 4, 5, 6
- 1, 2, 3, 4, 5, 6, 7
- 1, 2, 3, 4, 5, 6, 7, 8
- 1, 2, 3, 4, 5, 6, 7, 8, 9
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
«natural join»
[править код]- 1
- 1 и 2
- 1, 2 и 3
- 1, 2, 3 и 4
- 1, 2, 3, 4 и 5
- 1, 2, 3, 4, 5 и 6
- 1, 2, 3, 4, 5, 6 и 7
- 1, 2, 3, 4, 5, 6, 7 и 8
- 1, 2, 3, 4, 5, 6, 7, 8 и 9
- 1, 2, 3, 4, 5, 6, 7, 8, 9 и 10
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 и 11
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 и 12
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 и 13
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 и 14
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 и 15
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 и 16
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 и 17
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 и 18
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 и 19
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 и 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
Все основные возможности
[править код]- (1)
- (1) == (2)
- (1) & (2) == (3)
- (1) & (2) & (3) == (4)
- (1) & (2) & (3) & (4) == (5)
- (1) & (2) & (3) & (4) & (5) == (6)
- (1) & (2) & (3) & (4) & (5) & (6) == (7)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) == (8)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) == (9)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) == (10)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) == (11)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) == (12)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) == (13)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) == (14)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) == (15)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) == (16)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) == (17)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) == (18)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) == (19)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) == (20)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20)
- (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) & (11) & (12) & (13) & (14) & (15) & (16) & (17) & (18) & (19) & (20)
Предельное число параметров
[править код]- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
- 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20
- 1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20
- <1>, <2>, <3>, <4>, <5>, <6>, <7>, <8>, <9>, <10>, <11>, <12>, <13>, <14>, <15>, <16>, <17>, <18>, <19>, <20>