【测试】nexT的markdown支持

[TOC]

This is a test!

这是一个测试

一级标题

二级标题

三级标题

四级标题

五级标题
六级标题

Markdown

字体 加粗 显示
字体 加粗 显示
字体 斜体 显示
字体 _斜体_ 显示
字体 加粗并斜体 显示
字体 _加粗并斜体_ 显示
组合 加粗并斜体 显示

引用

引用引用

这样来 删除一段文本

  • 无序

    • 无序
      • 无序
  • 无序

  • 无序

    • 无序
  1. 有序
  2. 有序
    1. 有序
    2. 有序
  3. 有序
表头表头
单元格单元格
单元格单元格
表头表头
单元格单元格
单元格单元格

首页

首页: http://localhost:4000/


C++

查看代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
//#pragma GCC optimize(3,"Ofast","inline")
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#include <unordered_map>
using namespace std;

#define Mid ((l+r)/2)
#define pb push_back
#define mp make_pair
#define ls ((rt)<<1)
#define rs ((rt)<<1|1)
#define sq(u) ((u)*(u))
#define Abs(u) ((u)>0?(u):-(u))
#define ze(u) (Abs(u)<eps)
#define eq(u, v) (ze((u)-(v)))
#define Sgn(u) ((u)>eps?1:((u)<-eps?-1:0))
typedef long long LL;
typedef unsigned long long UL;
typedef double DB;
const int inf = 0x3f3f3f3f;
const LL INF = 0x3f3f3f3f3f3f3f3f;
const DB eps = 1e-8;
const DB pi = acos(-1.0);

const int N = (int)1e5;
const int M = (int)4e3;
const int mxn = N + 5;
const int mxm = M + 5;

LL ans = 1e18 + 7;

LL SUM(LL a, LL b)
{
LL cnt = 0;
for (a /= b; a; a /= b) cnt += a;
return cnt;
}

LL sum = 0, upperlim = 1;

void test(LL row, LL ld, LL rd)
{
if (row != upperlim)
{
LL pos = upperlim & ~(row | ld | rd);
while (pos)
{
long p = pos & -pos;
pos -= p;
test(row + p, (ld + p) << 1, (rd + p) >> 1);
}
}
else
sum++;
}

LL f[84] = { 0,1,1,2 };

void fib()
{
for (int i = 3; i <= 83; i++) {
f[i] = f[i - 1] + f[i - 2];
}
}

int main()
{
//int T; scanf("%d", &T);
//int n; scanf("%d", &n);
fib();

LL x, m;
scanf("%lld %lld", &x, &m);


LL v = 1, flag = 0;
for (v = 1; v <= 83; v++) {
if (x == f[v]) {
flag = 1;
break;
}
}


if (flag) {
for (LL i = 2; i * i <= m; ++i)
{
LL cnt = 0;
while (m % i == 0)++cnt, m /= i;
if (cnt)ans = min(ans, SUM(x, i) / cnt);
}
if (m > 1)ans = min(ans, SUM(x, m));
printf("%lld\n", ans);
return 0;
}

int n = x % min(13LL, m) + 1LL;

upperlim = (upperlim << n) - 1;

test(0, 0, 0);
printf("%lld\n", sum);

return 0;
}

/*

*/

Java

查看代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package cn.jee.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
import org.springframework.web.servlet.i18n.SessionLocaleResolver;

import java.util.Locale;

@Configuration
public class MyMvcConfiger implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(localeChangeInterceptor());
}

@Bean
public LocaleResolver localeResolver() {
SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver();
sessionLocaleResolver.setDefaultLocale(Locale.CHINA);
return sessionLocaleResolver;
}

@Bean
public LocaleChangeInterceptor localeChangeInterceptor() {
LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
localeChangeInterceptor.setParamName("lang");
return localeChangeInterceptor;
}
}

Python

查看代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import unittest

file = open("test.txt", "r+")
article = file.read()

@profile
def count_char_1():
num = 0
for line in article:
for word in line.split():
num = num + len(word)
return num


@profile
def count_char_2():
return sum([len(word) for line in article for word in line.split()])


@profile
def count_char_3():
return sum(len(word) for line in article for word in line.split())


if __name__ == '__main__':
count_char_1()
count_char_2()
count_char_3()
_/_/_/_/_/ EOF _/_/_/_/_/