题解列表

筛选

K-进制数:简单的排列组合思想

摘要:解题思路:本题目中要求n位的k进制数,0不能在首位,不能在0的后面,因此每个0只能位于非0数字的后面,因此假设有i个0,则这i个0需要在(n-i)个非0数字的后面选择位置,一共有c(n-i,i)中情况……

c语言代码解决问题

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>#define maxsize 100typedef struct{    double sco……

字符串解法

摘要:解题思路:如果要求每一位的数字,常规思路应该是整除,这个只是有点复杂并不难,本来想用一个数组的,后来觉得数组也有点麻烦,就直接用了字符串(其实是相似的道理)注意事项:字符串要使用string进行定义参……

术式反转 赫

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>#include <string.h>typedef struct _fushu{ int va……

c语言代码解决问题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>#include<stdlib.h>#define maxsize 100000typedef st……

结构体之成绩记录

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

结构体之时间设计

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int judge(int n) {     if (n % 4 == 0 && ……