Skip to content

Commit de07fef

Browse files
author
lazylzg
committed
Update 2-10手机键盘.cpp
1 parent 806fc69 commit de07fef

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

第2章暴力破解/2.2模拟/3.其他模拟/2-10手机键盘.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ int main() {
1414
char temp;
1515
for(int i=0; i<str.size(); i++) {
1616
time+=keytab[str[i]-'a'];
17+
//按键差值等于字母差值则在一个按键上
1718
if(i>0&&(str[i]-temp)==(keytab[str[i]-'a']-keytab[temp-'a'])) {
1819
time+=2;
1920
}

0 commit comments

Comments
 (0)