此文章的部分内容被密码保护:
点击展开
表面上
一级标题
二级标题
三级标题
四级标题
五级标题
六级标题
This is a test!
这是一个测试
Markdown
字体 加粗 显示
字体 加粗 显示
字体 斜体 显示
字体 斜体 显示
字体 加粗并斜体 显示
字体 加粗并斜体 显示
组合 加粗并斜体 显示
引用
引用引用
这样来 删除一段文本
-
无序
- 无序
- 无序
- 无序
-
无序
-
无序
- 无序
- 有序
- 有序
- 有序
- 有序
- 有序
表头 | 表头 |
---|---|
单元格 | 单元格 |
单元格 | 单元格 |
表头 | 表头 |
---|---|
单元格 | 单元格 |
单元格 | 单元格 |
首页: http://localhost:1313/post/test/#一级标题
LaTeX
行间公式 $$ a = b * c / d - (e + f) $$
行内公式 $ a = b * c / d - (e + f) $
代码高亮
C++
1//#pragma GCC optimize(3,"Ofast","inline")
2#define _CRT_SECURE_NO_WARNINGS
3#include <bits/stdc++.h>
4#include <unordered_map>
5using namespace std;
6
7#define Mid ((l+r)/2)
8#define pb push_back
9#define mp make_pair
10#define ls ((rt)<<1)
11#define rs ((rt)<<1|1)
12#define sq(u) ((u)*(u))
13#define Abs(u) ((u)>0?(u):-(u))
14#define ze(u) (Abs(u)<eps)
15#define eq(u, v) (ze((u)-(v)))
16#define Sgn(u) ((u)>eps?1:((u)<-eps?-1:0))
17typedef long long LL;
18typedef unsigned long long UL;
19typedef double DB;
20const int inf = 0x3f3f3f3f;
21const LL INF = 0x3f3f3f3f3f3f3f3f;
22const DB eps = 1e-8;
23const DB pi = acos(-1.0);
24
25const int N = (int)1e5;
26const int M = (int)4e3;
27const int mxn = N + 5;
28const int mxm = M + 5;
29
30LL ans = 1e18 + 7;
31
32LL SUM(LL a, LL b)
33{
34 LL cnt = 0;
35 for (a /= b; a; a /= b) cnt += a;
36 return cnt;
37}
38
39LL sum = 0, upperlim = 1;
40
41void test(LL row, LL ld, LL rd)
42{
43 if (row != upperlim)
44 {
45 LL pos = upperlim & ~(row | ld | rd);
46 while (pos)
47 {
48 long p = pos & -pos;
49 pos -= p;
50 test(row + p, (ld + p) << 1, (rd + p) >> 1);
51 }
52 }
53 else
54 sum++;
55}
56
57LL f[84] = { 0,1,1,2 };
58
59void fib()
60{
61 for (int i = 3; i <= 83; i++) {
62 f[i] = f[i - 1] + f[i - 2];
63 }
64}
65
66int main()
67{
68 //int T; scanf("%d", &T);
69 //int n; scanf("%d", &n);
70 fib();
71
72 LL x, m;
73 scanf("%lld %lld", &x, &m);
74
75
76 LL v = 1, flag = 0;
77 for (v = 1; v <= 83; v++) {
78 if (x == f[v]) {
79 flag = 1;
80 break;
81 }
82 }
83
84
85 if (flag) {
86 for (LL i = 2; i * i <= m; ++i)
87 {
88 LL cnt = 0;
89 while (m % i == 0)++cnt, m /= i;
90 if (cnt)ans = min(ans, SUM(x, i) / cnt);
91 }
92 if (m > 1)ans = min(ans, SUM(x, m));
93 printf("%lld\n", ans);
94 return 0;
95 }
96
97 int n = x % min(13LL, m) + 1LL;
98
99 upperlim = (upperlim << n) - 1;
100
101 test(0, 0, 0);
102 printf("%lld\n", sum);
103
104 return 0;
105}
106
107/*
108
109*/
Java
1package cn.jee.config;
2
3import org.springframework.context.annotation.Bean;
4import org.springframework.context.annotation.Configuration;
5import org.springframework.web.servlet.LocaleResolver;
6import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
7import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
8import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
9import org.springframework.web.servlet.i18n.SessionLocaleResolver;
10
11import java.util.Locale;
12
13@Configuration
14public class MyMvcConfiger implements WebMvcConfigurer {
15 @Override
16 public void addInterceptors(InterceptorRegistry registry) {
17 registry.addInterceptor(localeChangeInterceptor());
18 }
19
20 @Bean
21 public LocaleResolver localeResolver() {
22 SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver();
23 sessionLocaleResolver.setDefaultLocale(Locale.CHINA);
24 return sessionLocaleResolver;
25 }
26
27 @Bean
28 public LocaleChangeInterceptor localeChangeInterceptor() {
29 LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
30 localeChangeInterceptor.setParamName("lang");
31 return localeChangeInterceptor;
32 }
33}
Python
1#!/usr/bin/python
2# -*- coding: UTF-8 -*-
3import unittest
4
5file = open("test.txt", "r+")
6article = file.read()
7
8@profile
9def count_char_1():
10 num = 0
11 for line in article:
12 for word in line.split():
13 num = num + len(word)
14 return num
15
16
17@profile
18def count_char_2():
19 return sum([len(word) for line in article for word in line.split()])
20
21
22@profile
23def count_char_3():
24 return sum(len(word) for line in article for word in line.split())
25
26
27if __name__ == '__main__':
28 count_char_1()
29 count_char_2()
30 count_char_3()