chore: add more example problems
This commit is contained in:
parent
8b3961e633
commit
2331b1d30d
2
resource/runner/problem/.gitignore
vendored
2
resource/runner/problem/.gitignore
vendored
@ -2,3 +2,5 @@
|
||||
!.gitignore
|
||||
!example
|
||||
!example/*
|
||||
!book
|
||||
!book/**/*
|
||||
|
43
resource/runner/problem/book/ch1/1. factorial/config.json
Normal file
43
resource/runner/problem/book/ch1/1. factorial/config.json
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"Runtime": {
|
||||
"TimeLimit": 1000,
|
||||
"MemoryLimit": 16,
|
||||
"NProcLimit": 1
|
||||
},
|
||||
"Languages": [
|
||||
{
|
||||
"Lang": "c",
|
||||
"Type": "default",
|
||||
"Script": "",
|
||||
"Cmp": "HCMP"
|
||||
},
|
||||
{
|
||||
"Lang": "cpp",
|
||||
"Type": "default",
|
||||
"Script": "",
|
||||
"Cmp": "HCMP"
|
||||
}
|
||||
],
|
||||
"Tasks": [
|
||||
{
|
||||
"Id": 1,
|
||||
"Points": 20
|
||||
},
|
||||
{
|
||||
"Id": 2,
|
||||
"Points": 20
|
||||
},
|
||||
{
|
||||
"Id": 3,
|
||||
"Points": 20
|
||||
},
|
||||
{
|
||||
"Id": 4,
|
||||
"Points": 20
|
||||
},
|
||||
{
|
||||
"Id": 5,
|
||||
"Points": 20
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1 @@
|
||||
20
|
@ -0,0 +1 @@
|
||||
55
|
@ -0,0 +1 @@
|
||||
88
|
@ -0,0 +1 @@
|
||||
133
|
@ -0,0 +1 @@
|
||||
345
|
@ -0,0 +1 @@
|
||||
2432902008176640000
|
@ -0,0 +1 @@
|
||||
12696403353658275925965100847566516959580321051449436762275840000000000000
|
@ -0,0 +1 @@
|
||||
185482642257398439114796845645546284380220968949399346684421580986889562184028199319100141244804501828416633516851200000000000000000000
|
@ -0,0 +1 @@
|
||||
14872707060906857289084508911813048098675809251055070300508818286592035566485075754388082124671571841702793317081960037166525246368924700537538282948117301741317436012998958826217903503076596121600000000000000000000000000000000
|
@ -0,0 +1 @@
|
||||
24215638650792346558700053691985855570120556040258652734839783267039961720178323593174739047913617079695531502689473012213820889134885853992818438056445080201482863675240494802269823110125881000284687377104376400792200165127855908498047507347955446603093964326987087311394274684237308398502911304969719715098068025497504900730580217016573270011698467378924291550780873605154736879542602554635558428265690302091342359471863508627516511203478353542187151045838267239168928747525890559708487655213488727530884968558716385000436989129479527833010340517760688345368715729020015336862534353876914871201776699205878662858555857265544230999178449256448000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
26
resource/runner/problem/book/ch1/1. factorial/description.md
Normal file
26
resource/runner/problem/book/ch1/1. factorial/description.md
Normal file
@ -0,0 +1,26 @@
|
||||
# 求 N! 的值
|
||||
|
||||
## Tags
|
||||
|
||||
- C++一本通
|
||||
- 高精度
|
||||
|
||||
## Description
|
||||
|
||||
用高精度方法,求$N!$的精确值($N$以一般整数输入)
|
||||
|
||||
## Example Cases
|
||||
|
||||
### Case 1
|
||||
|
||||
#### Input
|
||||
|
||||
```
|
||||
10
|
||||
```
|
||||
|
||||
#### Output
|
||||
|
||||
```
|
||||
3628800
|
||||
```
|
47
resource/runner/problem/book/ch1/2. divide/config.json
Normal file
47
resource/runner/problem/book/ch1/2. divide/config.json
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
"Runtime": {
|
||||
"TimeLimit": 1000,
|
||||
"MemoryLimit": 16,
|
||||
"NProcLimit": 1
|
||||
},
|
||||
"Languages": [
|
||||
{
|
||||
"Lang": "c",
|
||||
"Type": "default",
|
||||
"Script": "",
|
||||
"Cmp": "FCMP"
|
||||
},
|
||||
{
|
||||
"Lang": "cpp",
|
||||
"Type": "default",
|
||||
"Script": "",
|
||||
"Cmp": "FCMP"
|
||||
}
|
||||
],
|
||||
"Tasks": [
|
||||
{
|
||||
"Id": 1,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 2,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 3,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 4,
|
||||
"Points": 23
|
||||
},
|
||||
{
|
||||
"Id": 5,
|
||||
"Points": 22
|
||||
},
|
||||
{
|
||||
"Id": 6,
|
||||
"Points": 25
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1 @@
|
||||
6 5
|
@ -0,0 +1 @@
|
||||
30 6
|
@ -0,0 +1 @@
|
||||
18 5
|
@ -0,0 +1 @@
|
||||
12 7
|
@ -0,0 +1 @@
|
||||
8 3
|
@ -0,0 +1 @@
|
||||
1034 1033
|
@ -0,0 +1 @@
|
||||
6/5=1.2
|
@ -0,0 +1 @@
|
||||
30/6=5.0
|
@ -0,0 +1 @@
|
||||
18/5=3.6
|
@ -0,0 +1 @@
|
||||
12/7=1.71428571428571428571
|
@ -0,0 +1 @@
|
||||
8/3=2.66666666666666666666
|
@ -0,0 +1 @@
|
||||
1034/1033=1.000968054211035818
|
42
resource/runner/problem/book/ch1/2. divide/description.md
Normal file
42
resource/runner/problem/book/ch1/2. divide/description.md
Normal file
@ -0,0 +1,42 @@
|
||||
# 求A/B高精度值
|
||||
|
||||
## Tags
|
||||
|
||||
- C++一本通
|
||||
- 高精度
|
||||
|
||||
## Description
|
||||
|
||||
计算$\frac AB$的精确值,设$A$,$B$是以一般整数输入,计算结果精确小数后$20$位
|
||||
|
||||
(若不足$20$位,末尾不用补$0$)
|
||||
|
||||
## Example Cases
|
||||
|
||||
### Case 1
|
||||
|
||||
#### Input
|
||||
|
||||
```
|
||||
4 3
|
||||
```
|
||||
|
||||
#### Output
|
||||
|
||||
```
|
||||
4/3=1.33333333333333333333
|
||||
```
|
||||
|
||||
### Case 2
|
||||
|
||||
#### Input
|
||||
|
||||
```
|
||||
6 5
|
||||
```
|
||||
|
||||
#### Output
|
||||
|
||||
```
|
||||
6/5=1.2
|
||||
```
|
43
resource/runner/problem/book/ch1/3. acc_sum/config.json
Normal file
43
resource/runner/problem/book/ch1/3. acc_sum/config.json
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"Runtime": {
|
||||
"TimeLimit": 1000,
|
||||
"MemoryLimit": 16,
|
||||
"NProcLimit": 1
|
||||
},
|
||||
"Languages": [
|
||||
{
|
||||
"Lang": "c",
|
||||
"Type": "default",
|
||||
"Script": "",
|
||||
"Cmp": "NCMP"
|
||||
},
|
||||
{
|
||||
"Lang": "cpp",
|
||||
"Type": "default",
|
||||
"Script": "",
|
||||
"Cmp": "NCMP"
|
||||
}
|
||||
],
|
||||
"Tasks": [
|
||||
{
|
||||
"Id": 1,
|
||||
"Points": 20
|
||||
},
|
||||
{
|
||||
"Id": 2,
|
||||
"Points": 20
|
||||
},
|
||||
{
|
||||
"Id": 3,
|
||||
"Points": 20
|
||||
},
|
||||
{
|
||||
"Id": 4,
|
||||
"Points": 20
|
||||
},
|
||||
{
|
||||
"Id": 5,
|
||||
"Points": 20
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1 @@
|
||||
123
|
@ -0,0 +1 @@
|
||||
200
|
@ -0,0 +1 @@
|
||||
345
|
@ -0,0 +1 @@
|
||||
888888
|
@ -0,0 +1 @@
|
||||
999999
|
@ -0,0 +1 @@
|
||||
7626
|
@ -0,0 +1 @@
|
||||
20100
|
@ -0,0 +1 @@
|
||||
59685
|
@ -0,0 +1 @@
|
||||
61382716
|
@ -0,0 +1 @@
|
||||
499999500000
|
28
resource/runner/problem/book/ch1/3. acc_sum/description.md
Normal file
28
resource/runner/problem/book/ch1/3. acc_sum/description.md
Normal file
@ -0,0 +1,28 @@
|
||||
# 求n累加和
|
||||
|
||||
## Tags
|
||||
|
||||
- C++一本通
|
||||
- 高精度
|
||||
|
||||
## Description
|
||||
|
||||
用高精度方法,求 $s=1+2+3+\cdots+n$的精确值
|
||||
|
||||
($n$以一般整数输入)
|
||||
|
||||
## Example Cases
|
||||
|
||||
### Case 1
|
||||
|
||||
#### Input
|
||||
|
||||
```
|
||||
10
|
||||
```
|
||||
|
||||
#### Output
|
||||
|
||||
```
|
||||
55
|
||||
```
|
63
resource/runner/problem/book/ch1/4. f_sum/config.json
Normal file
63
resource/runner/problem/book/ch1/4. f_sum/config.json
Normal file
@ -0,0 +1,63 @@
|
||||
{
|
||||
"Runtime": {
|
||||
"TimeLimit": 1000,
|
||||
"MemoryLimit": 16,
|
||||
"NProcLimit": 1
|
||||
},
|
||||
"Languages": [
|
||||
{
|
||||
"Lang": "c",
|
||||
"Type": "default",
|
||||
"Script": "",
|
||||
"Cmp": "HCMP"
|
||||
},
|
||||
{
|
||||
"Lang": "cpp",
|
||||
"Type": "default",
|
||||
"Script": "",
|
||||
"Cmp": "HCMP"
|
||||
}
|
||||
],
|
||||
"Tasks": [
|
||||
{
|
||||
"Id": 1,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 2,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 3,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 4,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 5,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 6,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 7,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 8,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 9,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 10,
|
||||
"Points": 10
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
6
|
||||
|
@ -0,0 +1 @@
|
||||
168
|
@ -0,0 +1,2 @@
|
||||
10
|
||||
|
@ -0,0 +1,2 @@
|
||||
12
|
||||
|
@ -0,0 +1,2 @@
|
||||
25
|
||||
|
@ -0,0 +1 @@
|
||||
38
|
@ -0,0 +1,2 @@
|
||||
50
|
||||
|
@ -0,0 +1,3 @@
|
||||
100
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
56
|
@ -0,0 +1 @@
|
||||
88
|
@ -0,0 +1 @@
|
||||
873
|
@ -0,0 +1 @@
|
||||
254120249273735911000907888640119535236287907165951916892565760428653068358394812028951886899362211706573251799059144977163198350579476833315404394194273776708617756335498155452476066616083404064569523579235001013208442504120594016095732334057618307254825831235764323593105039052556442336528920420940313
|
@ -0,0 +1 @@
|
||||
4037913
|
@ -0,0 +1 @@
|
||||
522956313
|
@ -0,0 +1 @@
|
||||
16158688114800553828940313
|
@ -0,0 +1 @@
|
||||
537169001220328488991089808037100875620940313
|
@ -0,0 +1 @@
|
||||
31035053229546199656252032972759319953190362094566672920420940313
|
@ -0,0 +1 @@
|
||||
94269001683709979260859834124473539872070722613982672442938359305624678223479506023400294093599136466986609124347432647622826870038220556442336528920420940313
|
@ -0,0 +1 @@
|
||||
723930191979474006646854190608859789522640775146933593199410448920420940313
|
@ -0,0 +1 @@
|
||||
187614911715749685817248425941004050893848927079322281432389628090868928026359770825810501448242006058427610137151642336528920420940313
|
32
resource/runner/problem/book/ch1/4. f_sum/description.md
Normal file
32
resource/runner/problem/book/ch1/4. f_sum/description.md
Normal file
@ -0,0 +1,32 @@
|
||||
# 阶乘和
|
||||
|
||||
## Tags
|
||||
|
||||
- C++一本通
|
||||
- 高精度
|
||||
|
||||
## Description
|
||||
|
||||
已知正整数 $N (N\le100)$,设$S=1!+2!+3!+\cdots+N!$
|
||||
|
||||
其中 "!" 表示阶乘,即$N!=1\times 2\times 3\times\cdots\times (N-1)\times N$
|
||||
|
||||
如:$3!=1\times 2\times 3=6$
|
||||
|
||||
请编程实现:输入正整数$N$,输出计算结果$S$的值
|
||||
|
||||
## Example Cases
|
||||
|
||||
### Case 1
|
||||
|
||||
#### Input
|
||||
|
||||
```
|
||||
4
|
||||
```
|
||||
|
||||
#### Output
|
||||
|
||||
```
|
||||
33
|
||||
```
|
63
resource/runner/problem/book/ch1/5. multiply/config.json
Normal file
63
resource/runner/problem/book/ch1/5. multiply/config.json
Normal file
@ -0,0 +1,63 @@
|
||||
{
|
||||
"Runtime": {
|
||||
"TimeLimit": 1000,
|
||||
"MemoryLimit": 16,
|
||||
"NProcLimit": 1
|
||||
},
|
||||
"Languages": [
|
||||
{
|
||||
"Lang": "c",
|
||||
"Type": "default",
|
||||
"Script": "",
|
||||
"Cmp": "HCMP"
|
||||
},
|
||||
{
|
||||
"Lang": "cpp",
|
||||
"Type": "default",
|
||||
"Script": "",
|
||||
"Cmp": "HCMP"
|
||||
}
|
||||
],
|
||||
"Tasks": [
|
||||
{
|
||||
"Id": 1,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 2,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 3,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 4,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 5,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 6,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 7,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 8,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 9,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 10,
|
||||
"Points": 10
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
36
|
||||
3
|
@ -0,0 +1,2 @@
|
||||
3636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636
|
||||
3636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636
|
@ -0,0 +1,2 @@
|
||||
223132
|
||||
546493
|
@ -0,0 +1,2 @@
|
||||
3575123464611135
|
||||
1546681346823682
|
@ -0,0 +1,2 @@
|
||||
1612303134360325403163115126153055453123651679781687421670
|
||||
87325901875974681619759111095656
|
@ -0,0 +1,2 @@
|
||||
1612303134360325403163115126153055453123651679781687421670
|
||||
0
|
@ -0,0 +1,2 @@
|
||||
87598475901847598759438109874591843275923875493817439085728
|
||||
298437928374982371598375498275192834579204187239084721390847293875498751908237491287349875923485
|
@ -0,0 +1,2 @@
|
||||
59837549827514646484846292834579204187239084721390847293875498751908237491287349875923485
|
||||
4236457456216386213857921746189264982365923612436823765023876109274091624865
|
@ -0,0 +1,2 @@
|
||||
10000000000100000000000000100000000000001000000000000001000000
|
||||
10000000000000000000000000000000000000000000000000001
|
@ -0,0 +1,2 @@
|
||||
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
|
||||
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
|
@ -0,0 +1 @@
|
||||
108
|
@ -0,0 +1 @@
|
||||
13223140495867768595041322314049586776859504132231404958677685950413223140495867768595041322314049584132231404958677685950413223140495867768595041322314049586776859504132231404958677685950413223140496
|
@ -0,0 +1 @@
|
||||
121940076076
|
@ -0,0 +1 @@
|
||||
5529576775305698493965538899070
|
@ -0,0 +1 @@
|
||||
140795825305476199280233019817945689100643760412642009218490674068242032885278427377265520
|
@ -0,0 +1 @@
|
||||
0
|
@ -0,0 +1 @@
|
||||
26142707676953212987620037484595819537530927510175652292771194988691770152906902796401039019311293198642505699704116000272347333325497182960052818083522080
|
@ -0,0 +1 @@
|
||||
253499234128493958903641901083610612560915799119395223324551028991082209611772242406659851469816572287755335937238553052013586988763671218944971611631489146063454525
|
@ -0,0 +1 @@
|
||||
100000000001000000000000001000000000000010000000000010010000000100000000000000100000000000001000000000000001000000
|
@ -0,0 +1 @@
|
||||
1234567901234567901234567901234567901234567901234567901234567901234567901234567901234567901234567900987654320987654320987654320987654320987654320987654320987654320987654320987654320987654320987654321
|
29
resource/runner/problem/book/ch1/5. multiply/description.md
Normal file
29
resource/runner/problem/book/ch1/5. multiply/description.md
Normal file
@ -0,0 +1,29 @@
|
||||
# 高精度求积
|
||||
|
||||
## Tags
|
||||
|
||||
- C++一本通
|
||||
- 高精度
|
||||
|
||||
## Description
|
||||
|
||||
输入两个高精度正整数 $M$ 和 $N$,求这两个高精度数的积
|
||||
|
||||
$M$ 和 $N$ 的长度均不超过 $100$ 位
|
||||
|
||||
## Example Cases
|
||||
|
||||
### Case 1
|
||||
|
||||
#### Input
|
||||
|
||||
```
|
||||
36
|
||||
3
|
||||
```
|
||||
|
||||
#### Output
|
||||
|
||||
```
|
||||
108
|
||||
```
|
43
resource/runner/problem/book/ch1/6. yubikili/config.json
Normal file
43
resource/runner/problem/book/ch1/6. yubikili/config.json
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"Runtime": {
|
||||
"TimeLimit": 1000,
|
||||
"MemoryLimit": 16,
|
||||
"NProcLimit": 1
|
||||
},
|
||||
"Languages": [
|
||||
{
|
||||
"Lang": "c",
|
||||
"Type": "default",
|
||||
"Script": "",
|
||||
"Cmp": "HCMP"
|
||||
},
|
||||
{
|
||||
"Lang": "cpp",
|
||||
"Type": "default",
|
||||
"Script": "",
|
||||
"Cmp": "HCMP"
|
||||
}
|
||||
],
|
||||
"Tasks": [
|
||||
{
|
||||
"Id": 1,
|
||||
"Points": 20
|
||||
},
|
||||
{
|
||||
"Id": 2,
|
||||
"Points": 20
|
||||
},
|
||||
{
|
||||
"Id": 3,
|
||||
"Points": 20
|
||||
},
|
||||
{
|
||||
"Id": 4,
|
||||
"Points": 20
|
||||
},
|
||||
{
|
||||
"Id": 5,
|
||||
"Points": 20
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
100000000
|
||||
100000000
|
@ -0,0 +1,2 @@
|
||||
2
|
||||
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
@ -0,0 +1,2 @@
|
||||
99999998
|
||||
999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
|
@ -0,0 +1,2 @@
|
||||
78473894
|
||||
8832642155044461583633521151059046808380316819087922379199216144844110044475286140264269480045782367488340711385240603755560939835449389707668393596666480539349109912048952407927989145796526660075388287655767729367758137928804351855885380612250804521010640230030418229812131164123374405932678978283787530097871142365255501388028475919498849058576972886072525825813503267718742788775281292481653779061581598551804801133220045042902022990853255810018261540212631194061936354464303529020438340782931310944202250699768949283822881610851252447956198072207623233351880835374018432914309747383494561340381382855505119144758342284895771684516810235299056643006506285537174406899939854605247954380949404660
|
@ -0,0 +1,2 @@
|
||||
98958803
|
||||
46316352910004734907421326642197611293802488819028164931506889205608228484290221354555986671742341485141366998247659187339552422096919272288456733738241017226523138391088992977710919015718505888485687323537448338970015142859393238209157721680190159121244910531619541478566450974177489441364332015982060447095058616346664961714391925154205804036168170645848616377245804315624727505388419398686380200127825376561563556879340843598133207243520556767223710814004242249055015120353624557509680858533192180976735843960724846606479072845778040065332407800521770085355743210692776052159103107
|
@ -0,0 +1 @@
|
||||
100000000
|
@ -0,0 +1 @@
|
||||
2
|
@ -0,0 +1 @@
|
||||
30444475
|
@ -0,0 +1 @@
|
||||
28646624
|
@ -0,0 +1 @@
|
||||
15535418
|
55
resource/runner/problem/book/ch1/6. yubikili/description.md
Normal file
55
resource/runner/problem/book/ch1/6. yubikili/description.md
Normal file
@ -0,0 +1,55 @@
|
||||
# 天使的起誓
|
||||
|
||||
## Tags
|
||||
|
||||
- C++一本通
|
||||
- 高精度
|
||||
|
||||
## Description
|
||||
|
||||
TENSHI 非常幸运的被选为掌管智慧之匙的天使。
|
||||
在正式任职之前,她必须和其他新当选的天使一样,要宣誓。
|
||||
宣誓仪式是每位天使各自表述自己的使命,她们的发言稿被放在N个呈圆形排列的宝盒中。
|
||||
这些宝盒按顺时针方向被编上号码$1, 2, 3, \cdots, N$。
|
||||
一开始天使们站在编号为$N$的宝盒旁。
|
||||
她们各自手上都有一个数字,代表她们自己的发言稿所在的盒子是从$1$号盒子开始按顺时针方向的第几个。
|
||||
例如:有$7$个盒子,那么如果TENSHI手上的数字为$9$,那么她的发言稿所在盒子就是第$2$个。
|
||||
现在天使们开始按照自己手上的数字来找发言稿,先找到的就可以先发言。
|
||||
TENSHI一下子就找到了,于是她最先上台宣誓:“我将带领大家开启NOI之门……” TENSHI宣誓结束以后,陆续有天使上台宣誓。
|
||||
可是有一位天使找了好久都找不到她的发言稿,原来她手上的数字$M$非常大,她转了好久都找不到她想找的宝盒。
|
||||
|
||||
请帮助这位天使找到她想找的宝盒的编号
|
||||
|
||||
输入: 两个数 $N$,$M$,满足 $2\le N\le 10^8$ 和 $2\le M\le 10^{1000}$
|
||||
|
||||
## Example Cases
|
||||
|
||||
### Case 1
|
||||
|
||||
#### Input
|
||||
|
||||
```
|
||||
7
|
||||
9
|
||||
```
|
||||
|
||||
#### Output
|
||||
|
||||
```
|
||||
2
|
||||
```
|
||||
|
||||
### Case 2
|
||||
|
||||
#### Input
|
||||
|
||||
```
|
||||
11
|
||||
108
|
||||
```
|
||||
|
||||
#### Output
|
||||
|
||||
```
|
||||
9
|
||||
```
|
63
resource/runner/problem/book/ch1/7. hanoi/config.json
Normal file
63
resource/runner/problem/book/ch1/7. hanoi/config.json
Normal file
@ -0,0 +1,63 @@
|
||||
{
|
||||
"Runtime": {
|
||||
"TimeLimit": 1000,
|
||||
"MemoryLimit": 16,
|
||||
"NProcLimit": 1
|
||||
},
|
||||
"Languages": [
|
||||
{
|
||||
"Lang": "c",
|
||||
"Type": "default",
|
||||
"Script": "",
|
||||
"Cmp": "HCMP"
|
||||
},
|
||||
{
|
||||
"Lang": "cpp",
|
||||
"Type": "default",
|
||||
"Script": "",
|
||||
"Cmp": "HCMP"
|
||||
}
|
||||
],
|
||||
"Tasks": [
|
||||
{
|
||||
"Id": 1,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 2,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 3,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 4,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 5,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 6,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 7,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 8,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 9,
|
||||
"Points": 10
|
||||
},
|
||||
{
|
||||
"Id": 10,
|
||||
"Points": 10
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1 @@
|
||||
8
|
@ -0,0 +1 @@
|
||||
3
|
@ -0,0 +1 @@
|
||||
15
|
@ -0,0 +1 @@
|
||||
18
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user