File tree Expand file tree Collapse file tree 2 files changed +27
-10
lines changed
Expand file tree Collapse file tree 2 files changed +27
-10
lines changed Original file line number Diff line number Diff line change 11---
22title : 2582.Pillow
3- date : ' 2024.01.01 0:00'
3+ date : " 2024.01.01 0:00"
44tags :
55 - Python
66 - answer
77 - math
88 - simulation
99abbrlink : 82e09f92
10+ docId : p9gvb8klqv990cq88j4l76zy
1011---
12+
1113# topic:
1214
13-
1415[ 2582.Pillow.md] ( https://leetcode-cn.com/problems/di-zhen-tou/ )
1516
1617# Thought:
1718
1819math题,Find a rule,npersonal,interval=n-1,The number of cycles in the crowd= $time // (n-1)$,The number of cycles is2The number of times from scratch,Otherwise, the number of forwards from the back。
1920
20-
21-
2221# Code:
22+
2323``` python
2424class Solution :
2525 def passThePillow (self , n : int , time : int ) -> int :
@@ -29,4 +29,4 @@ class Solution:
2929 return time % (n- 1 ) + 1
3030 else :
3131 return n - time % (n- 1 )
32- ```
32+ ```
Original file line number Diff line number Diff line change 11{
22 "repo" : " InvolutionHell/involutionhell" ,
3- "generatedAt" : " 2025-12-02T03:05:18.981Z " ,
3+ "generatedAt" : " 2025-12-03T03:07:03.245Z " ,
44 "docsDir" : " app/docs" ,
5- "totalDocs" : 130 ,
5+ "totalDocs" : 131 ,
66 "results" : [
77 {
88 "docId" : " ue27z7z95yzw3lhhfj7nit1c" ,
20682068 }
20692069 ]
20702070 },
2071+ {
2072+ "docId" : " p9gvb8klqv990cq88j4l76zy" ,
2073+ "path" : " app/docs/CommunityShare/Leetcode/[2582]递枕头_translated.md" ,
2074+ "contributorStats" : {
2075+ "114939201" : 1
2076+ },
2077+ "contributors" : [
2078+ {
2079+ "githubId" : " 114939201" ,
2080+ "contributions" : 1 ,
2081+ "lastContributedAt" : " 2025-12-03T03:00:10.000Z" ,
2082+ "login" : " longsizhuo" ,
2083+ "avatarUrl" : " https://avatars.githubusercontent.com/u/114939201?v=4" ,
2084+ "htmlUrl" : " https://github.com/longsizhuo"
2085+ }
2086+ ]
2087+ },
20712088 {
20722089 "docId" : " ytg2bds2dnhzw37nrb3vassy" ,
20732090 "path" : " app/docs/CommunityShare/Leetcode/1004_translated.md" ,
22762293 "docId" : " r12u8o7j73oxhbvgphi939fb" ,
22772294 "path" : " app/docs/CommunityShare/Leetcode/3072. 将元素分配到两个数组中 II_translated.md" ,
22782295 "contributorStats" : {
2279- "114939201" : 1
2296+ "114939201" : 2
22802297 },
22812298 "contributors" : [
22822299 {
22832300 "githubId" : " 114939201" ,
2284- "contributions" : 1 ,
2285- "lastContributedAt" : " 2025-12-02T03:00:09 .000Z" ,
2301+ "contributions" : 2 ,
2302+ "lastContributedAt" : " 2025-12-02T03:05:20 .000Z" ,
22862303 "login" : " longsizhuo" ,
22872304 "avatarUrl" : " https://avatars.githubusercontent.com/u/114939201?v=4" ,
22882305 "htmlUrl" : " https://github.com/longsizhuo"
You can’t perform that action at this time.
0 commit comments