求从左上角到右下角的最短路径,1是路,2是墙,只可以前后左右的走。 dfs: #include<cstdio>
#include<cstring>
using namespace std;int maze[5][5];
int ans;
bool vis[5][5];
const int dir[4][2]={0,1,0,-1,1,0,-1,0};s
简单题 #include <cstdio>
using namespace std;int main()
{int t;scanf("%d", &t);while (t--){long long n;scanf("%lld", &n);long long temp = 5;long long ans = 0;while (temp <= n){ans += n / temp;temp *=