题解列表

筛选

自由落体问题

摘要:解题思路: 在一次落地之后,下一次落地前弹起和下落的距离和为上一次下落的距离 参考代码: ```c #include int main() { int n; scanf("%d",……

抓住那头牛(python)

摘要:解题思路:注意事项:参考代码:def catchCow(n, k):    if n == k:  # 如果农夫和牛的位置相等,那么花费时间为0        return 0    visited ……

Knight Moves(python)

摘要:解题思路:注意事项:参考代码:from collections import dequedef knight_moves(n, start, end):    directions = [      ……

求s=a+aa+aaa+aaaa+aa...a的值

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){         int n,s=0,k,i,q=0;         ……

遍历素数,然后查找

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main() {    int x;    cin >> x;    ve……

暴力求解———C语言

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main(){ char a[3][30],b[30],c[30]; int i; fo……