Part 2 solved and working :D
This commit is contained in:
parent
1610660749
commit
4f5c029583
300
prob3_part2.txt
Normal file
300
prob3_part2.txt
Normal file
@ -0,0 +1,300 @@
|
|||||||
|
zBBtHnnHtwwHplmlRlzPLCpp
|
||||||
|
vvhJccJFGFcNsdNNJbhJsJQplQMRLQMlfdfTPCLfQQCT
|
||||||
|
GPhjcjhZDjWtnSVH
|
||||||
|
BNhHVhrGNVTbDHdDJdJRPJdSQQSJwPjR
|
||||||
|
lvtsfbsqzwSnJcvjSm
|
||||||
|
MftttFLftZMLgtgMbltMqZzbDNrTpVGhNWrDTrpTGNpZGZhD
|
||||||
|
VSSHcTgTtTdtllZlzmmbljTn
|
||||||
|
RqMqsFfQLLFLQFMMfRLPZLvPpCfWrbpmCbjCnfjlWmnrmmnm
|
||||||
|
hqRDqPDRsqNHwtHSNBZtJd
|
||||||
|
tNFDpDFrtdjfmjjjFmFFdScpZhZScTJgpHccHhMJgS
|
||||||
|
lLzSlSCQqbsVhBghggBZgCcJ
|
||||||
|
zRLVVLQnvQqVVzRldfWrwffjjdwSdfjv
|
||||||
|
bpWqqqWvHBpwGBCCRl
|
||||||
|
hJdjdJFQqdBBDMMC
|
||||||
|
tFFzJZFtJSqtZJQsWLbNSTnffHfvTH
|
||||||
|
lFhRZhFjPlqMlJqZJlJcRLwrLrwStRwtsVVtVSrgRV
|
||||||
|
WcpDvDfBmpDHzWBDbpbmWmNVSSTzLTtrVswgttVVzwwr
|
||||||
|
pbWfmGBpHfDmWnvvGbmWnjjMqPJMlMFPdGcjqPqPhP
|
||||||
|
NjFNRlpVLFCSSlbBWWfw
|
||||||
|
pssPZQQsMnzmtnQPttzDBbBJBcrrJWbrZSBJSbfC
|
||||||
|
QTHPHspMNGHdhvRR
|
||||||
|
QfPdSJfFJmthSthtwbsNLbPLlLTLpbvP
|
||||||
|
nHnMBnZqqgBMnWrZMqnZVcbCqRwNsvblRwppbllTsRNp
|
||||||
|
nZHBHznMnWgcrnVBtjFdfmzQNtNddjNF
|
||||||
|
hFhfPghppPhpRNhzsjsvHVzjpsGnWz
|
||||||
|
tTjlCCwMqtdMjMctGJWHwWnVwWnwvWGs
|
||||||
|
rZdrjBBtqdCtlcdgFZQLfhRLFSgRNP
|
||||||
|
RDHSWrJWffJFlJCgCMCDjCvzjPMP
|
||||||
|
QtGTndBwBtNzBVjBCMgB
|
||||||
|
LdwwMpTdwsRHsqSHqHJl
|
||||||
|
RfsfzvLLFvFzCSvSbDsTpTGMPMZPPTMt
|
||||||
|
jqWBjwBBNwWqwPGZbTwVwVtD
|
||||||
|
BnhgglhhNNngqjBjHNWrZLlFLSCJSFFCCQzQvQFCFF
|
||||||
|
HLvLDQbvnDQDvbHTLhntSnGBSlfGldddcmfMMf
|
||||||
|
NgFjZjrZZJrlfJfSVcBJGc
|
||||||
|
scWCNFZpsjzrDLwLhbQzhQwD
|
||||||
|
SlqJlThDPqpwSTwhcbDdbWDbZGcZNcDb
|
||||||
|
MsnWWjHjvLvfscjjgdzNdbgbcc
|
||||||
|
vQQvWVQFLLHfHVBWfsfmFFpJRhhSplqlRJqpBwlqTCPC
|
||||||
|
DZbDzzZDjQbPGZFFSSgSlFCzTgzm
|
||||||
|
qLnvwvhddrqMrwrCTLLFJjmtSlFlSH
|
||||||
|
VdhvsWqdVWvvRhsvqbpbPcZfPpjZGBQNRj
|
||||||
|
mJNtNFmzDZtzdzrLtwwRqJSchgfGcRfwRB
|
||||||
|
pWpjQjCTQnHMWCCpjQpHvTqcwTwScfRcBcSGBRThwS
|
||||||
|
MQHjvjVCCqsvljWnVQzLtNPZzmzLVNLddtPN
|
||||||
|
QVRPRVDgsRjLssnL
|
||||||
|
TTGDJDJfbfLHSnsMWWbs
|
||||||
|
qGqqTFFDqgQgQQQq
|
||||||
|
nlMnRRjbMjCdJVQJCZ
|
||||||
|
nGqfLwfNLFNLnPPGFVVCdVGZJtCtCCVzJz
|
||||||
|
LHHfPNHnPqqLwqPqDPWfNFvMglbhhbMgmclgcllDmgmrcl
|
||||||
|
cLLWWSThtdLpRcddcgPRZFDMCVPPMCCPCPCZ
|
||||||
|
NfGbGNzrBNffGNJjbPPZsZmZZPmDHpMH
|
||||||
|
zlJBfzlQzNjNjfJcpwSdvWhcvLwQWt
|
||||||
|
cVVQfVCJVrVcTJnfNvlDFmDrmlvrFWlL
|
||||||
|
snZHpMhZtMbtPNvzHWWvNFNvNW
|
||||||
|
gppnbbbRgMnZbswRqRwbqTcCCSTCJJdGjgfVGTdcCG
|
||||||
|
jplgNdrHrrNZgdHmlHNJHddlDSPPSTlzTSlTSDSzCQLfzf
|
||||||
|
vscvWWWvGWGGscbFMpRWFwQTPzfLQwQwPfLbzSzzDL
|
||||||
|
GvGBWpqcMVRNNZHgdHdtBJ
|
||||||
|
LchbZhjjZFjwSmPRqRffqbdtggdR
|
||||||
|
vWHMWlHJdGqtRqHV
|
||||||
|
MvzCJlnMnlTNnNNLLdhjjCdjjhDjjL
|
||||||
|
FNCllHFvCGvwQcPQJfgfmwgh
|
||||||
|
zjtRpbDLjtsrzbLLQmfBTgTBQQfhbfQB
|
||||||
|
WLgqRzqsrWvFGFZFZC
|
||||||
|
qjLlNcLjcNWpQLlQMmvmhCvCgsMZZghj
|
||||||
|
tGSDJtRGJzHMMGDVZCfvmfhzmZZgZsmv
|
||||||
|
BSSRDRHBGHtSSSbGJSwHbNcLQddqMNlrqcMQMldBWc
|
||||||
|
JSfctrtctDpszHvzVQHr
|
||||||
|
glCWjhWmFjlmlhmdWPhVVznvcHjszbvvpHvznv
|
||||||
|
FgBmFhCBCGFqglgmhCFmSTSRLJLLZfSRJcDSGMtM
|
||||||
|
vZGlFFtLMLdShSSShRVtVf
|
||||||
|
rQNvmznWPNCPNsrCsbWbsPCvjShhhfHBBHJjSJRhjSRnHhSj
|
||||||
|
mCNsQCmqszNcQzrzrrzWvGgGMgpdFpMLlFZGwcLDdg
|
||||||
|
QJRJQDlcqLlWbNGL
|
||||||
|
HCnwwsCrnstLWqtWNgZNgg
|
||||||
|
rsnTrTCHTnnVwnsVPqqDQcRjcczMPvPRzM
|
||||||
|
qCzjqnzVdzrdhnhddDbDBMPttcGBDBDPnc
|
||||||
|
sZgRQWHgWHHLsgsRRZsJbpJlDcDGNcTDFtGNFFcJNFPBPBTc
|
||||||
|
WggbRQSRRgRSsWWmbHqvVffVwhzvCdmfhmdV
|
||||||
|
lhqWcNpQGcNmmHmNPWCsQzQsgrQrBMCMbMVM
|
||||||
|
wDLFFDJvSFFZRDZSzCrzTzsRgVWbCrMW
|
||||||
|
dFwDtZfdjFZWFFfmHGPnPPmqfmPNcN
|
||||||
|
lcMRNJRGGLJnNVFbVrwrwZrD
|
||||||
|
tjCzQjQhQwgWFShVFS
|
||||||
|
ffHQsQssQTzBsPnLpMPRwsJP
|
||||||
|
MQSMSBSRFMQLJChLChjTBh
|
||||||
|
WmVlPrwnpwDlflNpDrNnDlDwThJCCdLJhhdhCfJTccGjvscd
|
||||||
|
gnDVnNnwgglwDwptSZFzgQHqbjZgZZ
|
||||||
|
nwBcFgwTDcNrpZMD
|
||||||
|
WQWCLZmvhMRvNjsNSD
|
||||||
|
CGGWmZGHHhtVzHbTqgTdbgzz
|
||||||
|
RmcTCwvssRbsThTcVRJJfSPqfJwJFqfjfMFq
|
||||||
|
zQNZDWtQlDZGBQPfFQqjJLjL
|
||||||
|
rrglggZGWnrnrrHlDhsbsPTVCsCVsTRpHv
|
||||||
|
wFGfzSvCPGttSzqwmtqmvvPRDDRCWgWWDTBTMcBcBWbCRM
|
||||||
|
hVJJHQHnpWnDTNnnDb
|
||||||
|
LJsVVdhQqvmdbbSf
|
||||||
|
srlJztzsVVsSsVtRlNllTWzzmqGhqWLPCDCgmChPLDdqCmCP
|
||||||
|
bZQMZpbvMBMgmDGmZLSPZd
|
||||||
|
MpScMSMpvfjMBcBcfMfSBnzlTjssNszrNrtlTVzlzFVN
|
||||||
|
rCtgrgClprGGClnJCZmwtMjZRjbjjcjZQv
|
||||||
|
PWVfBHWPdbNfbbRmRj
|
||||||
|
sPsVqFPsHWLhBVVqHFqPVddWSDLJgpTCnnrRRLGpJSSTRrgT
|
||||||
|
zjqpGjrQjGqSHCVvCrRZDN
|
||||||
|
cTdshMhdmcMNmddRHBhvCCBCCvHZDC
|
||||||
|
JTmTmJnLTdwzNQpPWJWgpP
|
||||||
|
BmpZmrzZnznHbpprSbQSQbqdSVqbPQcV
|
||||||
|
fRGTGJZRTTDwJTJRGDfgJgNFlSSFcldfdccFVlPlFFQPSQ
|
||||||
|
GvTTTZZLmsntzmCL
|
||||||
|
VhMcrmbhvzMSnhvftbRbllLtglBBtf
|
||||||
|
HqqqJqDqPjJPNjjDVFDZCdqBtRtGBGlGRfQQgttQfHlTQl
|
||||||
|
pCZJPqqZpmhvhpVh
|
||||||
|
dWLBJHJhGJGMBJRcDLDSQsSQpvcR
|
||||||
|
ZlnnPqglblfRRpSvSsnz
|
||||||
|
sPTgZVjjmwVTljrwTTlbwVGdJhBNNdFdMGNHHJMjBNFN
|
||||||
|
FhFrfbfgbLRdfqfrmvDgLdjrcQtSNStHHHQlSjJJPllt
|
||||||
|
CnspzZWTpCnMVzzZZGZRCzttHNjNlQlSNtNlNjVcjlQS
|
||||||
|
GCZsZBRwnvwfbqwFwb
|
||||||
|
bZnJFJgLFRnqQZqJQJFQGpCLNcGlLllClNtccjGc
|
||||||
|
rVfvwPDhPHGtlcbClr
|
||||||
|
mBhshsfMvBvqsQJdTbgnqQ
|
||||||
|
jgWHqMSWMGqWjWjqbWGJQDfVqLfrfDfJhVLfTr
|
||||||
|
pPplwsRZPFZFtLhfwgfwrhJL
|
||||||
|
zlRsdgFcRgmjdBCMHdjHWB
|
||||||
|
qJSGJSPQWzcprtQZtt
|
||||||
|
mBMVfsNBnZzcNtcc
|
||||||
|
LMLBsmMlvBgFsghVVvfgLBvbJJSqgGHqPGPtCWwbJHqCPG
|
||||||
|
ZvZLcdMGVMlHDvDpvqhH
|
||||||
|
NNSrQNbJbrTnnWZDDZqqhqpW
|
||||||
|
wbgNJrsrCww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GDwftPrB
|
||||||
|
rqsRrHsvsPqswNcJcNJrnnBrNn
|
||||||
|
bFjgGFdbVRNNnpRQpV
|
||||||
|
GSthhggGDSvMRqtHvMfM
|
||||||
|
ZwVPgMsgVsGzVsRZpgpzzgpFMrNbbLFrDLFFrrSDLfrNBN
|
||||||
|
qvnjBhQhntbfDLrF
|
||||||
|
CJlHHcHcTWqvpBdsWRpdPdgs
|
||||||
|
BjmTDjJBCBWrgQRPFlWWlW
|
||||||
|
dHphshtdtVHVhpJqspdvRrqFPgrLPPFPrrRPvQ
|
||||||
|
sdMsMtStVszpwMzHjJGjCcZjmScNfCDf
|
||||||
|
DmGdDffgDSDDdJstqdJldlRt
|
||||||
|
MhnvMCZCbbZHMvsCHtrcVrPjJcRqVtlt
|
||||||
|
LsQbsFZvZhQzZwhQWTNgBWpNwSGpTmfS
|
||||||
|
RRJQnCzbZZLTZJCBtWvFtsfqBqtfWb
|
||||||
|
prjlChGNldGNdlSVMhWfqWtfsvwvqsFtdtsq
|
||||||
|
GGjNDNhpMGMGVhrnZZTzcTHCCJcDHc
|
||||||
|
RmbMmjgpPjMBsBMfchhVsc
|
||||||
|
HwFWFTztSrtFpcQvBsSqVscBBC
|
||||||
|
zWwnJFHtWWHDgbGgdpGpnl
|
||||||
|
mnbWbRRLRFnmmWcCDTBVwCDBlwNW
|
||||||
|
ggJPtpdHGfdZtMHgtZgVPPBCVsPNBcsBTTDDCC
|
||||||
|
hpvJJTpGhdhtJdMHqvmmnLvSbmnFnRFm
|
||||||
|
WWtrWrNgVbRjMrQCNzqJFwQJFNTJ
|
||||||
|
LdHPhcdchQQssLzJrz
|
||||||
|
pBccnHpnrrcGHnnSlWjnRMSlbt
|
||||||
|
NMMfNFnZgMVThhTMcgTDJDJjsVvvJJqJmHsqHG
|
||||||
|
LQpwwprCQzBNBdGjGjHswswdvm
|
||||||
|
CBCzzCrbWbSlNQnTRgPPfFRWnfgc
|
||||||
|
RFwHVQRwFgTQSFVhdsdHsBdDBnnqnq
|
||||||
|
LGftLtPGGMzlNrhlPqPsrJ
|
||||||
|
fvGpWpMtccpTwwpRRQhh
|
||||||
|
TTJCGdTGtZRQQCnzcnCv
|
||||||
|
FWWHPSFNFbDbDDqSWnVmLRRjRRQLhcmLjS
|
||||||
|
qPwPWwFppbwggGZGfdJZgdnGdd
|
||||||
|
zSTWzrzWTLWpCtCGpqqGgplc
|
||||||
|
nZWwsJVZZBnJHJCclHllgtChgCgc
|
||||||
|
DFnVBJsFssVVFBFnBdfvjDSmTMWzrmMfRmTv
|
||||||
|
MJmgMssrsggqqMVstbwTcTbPbTTwThmw
|
||||||
|
NRBBGRjHVRRcRbCp
|
||||||
|
QnSfzLWzNHzNVQQVjrglJMsMFvgJdFWrgZ
|
||||||
|
ggLLGnhgnPvJHZnN
|
||||||
|
VBtmVSldbSBVlcNPHvjmNcwNZZ
|
||||||
|
tdWqSVSSBztVWGrThLhfrfvG
|
||||||
|
TDqrjdSwLqDppdTCdzPBFmmjQmhHFPFQhPFR
|
||||||
|
zlGbMcVcVtsPHFRhWRRsPF
|
||||||
|
btgvlVVcDZZZqgrz
|
||||||
|
DgwlgbbFDDjjPTHDrmddPhPV
|
||||||
|
WqtMBBtQsttMNWQBqsbJpGGzdPdTHLVmTzJhmTPhHHPTmH
|
||||||
|
qQsqGZNQtZGMNsNtZpFnjnCRbZffwwSRljFf
|
||||||
|
gMdFLCdnMZCTFFCqnTgWLCHfSgPgPHStcQQmfSBBSfHg
|
||||||
|
vrwwrwzbGjjswjvhGGsjPQmqRmHPbBtcBQtqfmcH
|
||||||
|
qzJllVsGVGljjsrzwDzhwzDGTddNLFnZWNdpCVWTNTZTLZCF
|
||||||
|
LtwMhDtctwbwwppdWBJQJBWPvPfDfqvG
|
||||||
|
FTzrNrgSRFrgzFRHNVFQJvlqHjBvQWlQWqPBfq
|
||||||
|
sFgNzmVmNzgTvVTMwhMhstMwZtsbsc
|
||||||
|
MrBDQVzzlrvhQzQrDMVQrzrzgRJnRRwwRbwSwwV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||||||
|
dJJQccnRPpcbQcMHsSgSMsDMTJSg
|
||||||
|
WWGBBvPflnWbBWhvhbPvNfnnVCFZmVRVZmVGMVwRLCCCGwVC
|
||||||
|
gjszgTMrgzgqCRRdmJRjJLVw
|
||||||
|
grzQHzqczMSzqSHcgQsqPvPlbNblpPhhPPbHvnhp
|
||||||
|
sJDDNWdnRLTTvqwSFPCmLCCrCq
|
||||||
|
thzplgfjglflFcbMclpppMfcwPqCZQCmqCwrzCqmQmHSqPqq
|
||||||
|
MhcpFBMBlhjbBTdnNJWvNvsvBd
|
||||||
|
czwwghnWWfcfgwfWthfrvVvrjdrdvDDVrbzrLF
|
||||||
|
RHPPMRpQPRMPPJRjJQsZsrrvvJBDDVDVdFqrBrFdBv
|
||||||
|
smjMsGZHRsHSmRQNGHPpSTwwttCflwngnChcCtWW
|
||||||
|
bprrrwrtLDtrWwrQjRDQDbPPVHVmmmmHNWlPlVNPZZlv
|
||||||
|
hqqhfnBCTfnnhzJwzsqzfPZZMCCVZVHHFvZMFvZmlC
|
||||||
|
TzhhdJTqJzcBdJJnzjtQrLdjwgLtpbgrLQ
|
||||||
|
qzQvzzgWSCqtqqGpddGc
|
||||||
|
jLrZNZhZrNRLHNffhrjNjNdtdZtGcPFwFwpbGwbVpdwC
|
||||||
|
nHnhrLNCCMHmhHBMhrzvgJvsWSWMWzzWzSlv
|
||||||
|
RzcbzdRFzbbzbzbFdZFTHMZPhVhVQMLrlrQPhLZlMM
|
||||||
|
BNGfBvsNttVmMhlMLm
|
||||||
|
BwGjpllswfjwpcFDWcWcbpdb
|
||||||
|
SjzpswrLSDjVSpwlmZJBTBdNJLvBNvHQZT
|
||||||
|
rCcCtbqgCfthggtbGGMqqghqZQvvQTBNJQHQZQTcZTJFZFFd
|
||||||
|
CggGMtqMfWbbGghPhhbCMtmsSppSspjpmWzjVSWlVrrm
|
||||||
|
PmWTPThTQWnLWQFl
|
||||||
|
VNcSVfMbtsddBQNnNpdl
|
||||||
|
sSjctwjVSzzccjgnTnDTHRDhqjRR
|
||||||
|
WfMWfCNCjWWHNTccMjRjfRcMbqSwfVwqwsfGGbssrJSrswVw
|
||||||
|
llLFQLlvlPFnhQBPBZQBqvBwzSzGGhShJVwShmsJbbmzSG
|
||||||
|
lnPqvQZBFFBnnpgplFvtvHDjTdcTjTMMjCRNCMWgRC
|
||||||
|
rprFNFFNjNLmMdgcqL
|
||||||
|
BvzCQQbBQgffsDbvVHMdbcVqmLVqlmqq
|
||||||
|
JvJCzBDJwnsRnQDszCBnnnQBrjZPjFpgZFTFZRpTrpZFGFtT
|
||||||
|
wBHQQZHVCcpwDgdZdMsZjvMZFn
|
||||||
|
GPSzlNlJLfzzzvsWdWLMmFWLMM
|
||||||
|
NfqGSfrTNzRTqJfRbptQHFQFrwrFHBHw
|
||||||
|
sNjVMVNVMzPzQgghcMsNzJtjSJtTFDTJtJnnDLjDnL
|
||||||
|
CHwrdCpvCrwrWdpZqcpFttJSFJTLLHLJfbnbfD
|
||||||
|
qrlZCwlqZrqqpWdlRqCRqdqcVNsVMzQzmNgNPBsRhVQVVzMs
|
@ -18,4 +18,9 @@ fn main() {
|
|||||||
let max_part1 = prob3::solve_part1(file_path);
|
let max_part1 = prob3::solve_part1(file_path);
|
||||||
println!("Solution for problem 3 part 1: {max_part1}");
|
println!("Solution for problem 3 part 1: {max_part1}");
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
let file_path = "prob3_part2.txt";
|
||||||
|
let max_part2 = prob3::solve_part2(file_path);
|
||||||
|
println!("Solution for problem 3 part 1: {max_part2}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,57 @@ pub fn solve_part1(file_path: &str) -> i32 {
|
|||||||
let (first, last) = item.split_at(item.len() / 2);
|
let (first, last) = item.split_at(item.len() / 2);
|
||||||
let second = last.chars().collect::<HashSet<char>>();
|
let second = last.chars().collect::<HashSet<char>>();
|
||||||
let intersection = first.chars().collect::<HashSet<char>>();
|
let intersection = first.chars().collect::<HashSet<char>>();
|
||||||
let character = *intersection.intersection(&second).next().unwrap_or(&(0 as char)) as i32;
|
let character = *intersection
|
||||||
|
.intersection(&second)
|
||||||
|
.next()
|
||||||
|
.unwrap_or(&(0 as char)) as i32;
|
||||||
character_to_code(character)
|
character_to_code(character)
|
||||||
})
|
})
|
||||||
.collect::<Vec<i32>>()
|
.collect::<Vec<i32>>()
|
||||||
.iter()
|
.iter()
|
||||||
.sum::<i32>()
|
.sum::<i32>()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn solve_part2(file_path: &str) -> i32 {
|
||||||
|
let binding =
|
||||||
|
std::fs::read_to_string(file_path).expect("Please provide a text file as an argument.");
|
||||||
|
let mut iter = binding.lines();
|
||||||
|
binding
|
||||||
|
.lines()
|
||||||
|
.step_by(3)
|
||||||
|
.collect::<Vec<&str>>()
|
||||||
|
.iter()
|
||||||
|
.map(|item| {
|
||||||
|
let common_letter = {
|
||||||
|
let first = &iter
|
||||||
|
.next()
|
||||||
|
.expect("Expected a string, not nothing.")
|
||||||
|
.chars()
|
||||||
|
.collect::<HashSet<char>>()
|
||||||
|
& &iter
|
||||||
|
.next()
|
||||||
|
.expect("Expected a string, not nothing.")
|
||||||
|
.chars()
|
||||||
|
.collect::<HashSet<char>>();
|
||||||
|
&first
|
||||||
|
& &iter
|
||||||
|
.next()
|
||||||
|
.expect("Expected a string, not nothing.")
|
||||||
|
.chars()
|
||||||
|
.collect::<HashSet<char>>()
|
||||||
|
};
|
||||||
|
if !common_letter.is_empty() && common_letter.len() > 1 {
|
||||||
|
panic!("Anormal behavior. Must have only 1 element in {common_letter:?}");
|
||||||
|
} else {
|
||||||
|
let unique_letter = *common_letter
|
||||||
|
.iter()
|
||||||
|
.last()
|
||||||
|
.expect("Impossible to have this message else Rust has a problem...")
|
||||||
|
as i32;
|
||||||
|
character_to_code(unique_letter)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.collect::<Vec<i32>>()
|
||||||
|
.iter()
|
||||||
|
.sum::<i32>()
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user