在 git 没有运行完成之前强制关闭,下次提交的时候会产以下生错误,或者类似的。 1 2 3 4 5 fatal: Unable to create '/xxx/xx/.git/index.lock': File exists. If no other git process is currently running, this probably means a git process crashed in this repository earlier. Make sure no other git process is running and remove the file manually to continue. 原因是在你进行某些比较费时的 git 操作时自动生成,操作结束后自动删除,相当于一个锁定文件,目的在于防止对一个目录同时进行多个操作。 有时强制关
题目链接 Dreamoon wants to climb up a stair of n steps. He can climb 1 or 2 steps at each move. Dreamoon wants the number of moves to be a multiple of an integer m. What is the minimal number of moves making him climb to the top of the stairs that satisfies his condition? 1 InputThe single line contains two space separated integers n, m (0 < n ≤ 10000, 1 < m ≤ 10). 2 OutputPrint a single integer — the minimal number of moves being a multiple of m. If there is no way he can climb satisfying condition print - 1 instead. 3 Examples 3.1 input110 2 3.2 output16 3.3 input23 5 3.4 output2-1 3.5 NoteFor the first sample, Dreamoon could climb in 6 moves with following sequence of steps: {2, 2, 2, 2, 1, 1}. For the second sample, there are only