题解列表
C语言程序设计教程(第三版)课后习题8.5 (C语言代码)
摘要:解题思路:首先说一下会用到的标准库函数,gets(),puts(),strlen(),前两个是在头文件stdio.h中,后一个是在string.h里,用法如下: 1、gets():与sc……
用筛法求之N内的素数。 (C语言代码)
摘要:解题思路: 注意事项: 大一学了一学期C语言,不怎么深。比较繁琐,但运行正确。参考代码:# include<stdio.h># include<math.h>int main(){ int n; sc……
求1+2+3+...+n的值 (Java代码)
摘要:解题思路:注意事项:参考代码:import java.math.BigInteger;
import java.util.*;
public class Main {
public stati……
逆序数 (C语言代码)
摘要:#include "stdafx.h"#define max 100int main(){ int n,a[max],i,j,count=0; scanf("%d", &n); for (i = 0;……
蓝桥杯算法提高VIP-排列数 (C++代码)
摘要:解题思路:next_permutation大法注意事项:参考代码:#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <v……
与2无关的数 (C语言代码)KE AC
摘要:解题思路:首先在遍历上,只遍历奇数,之间排除能被2整除的数,然后就是取每一位上的数看是否为2;细节再代码中注意事项:注意fg标志的置零位置,和用一个中间遍历t代替i参考代码:#include <cst……
蓝桥杯2013年第四届真题-买不到的数目 (C语言代码)
摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;int check(int n,int c,int d)……
C语言训练-排序问题<1> (Java代码)利用Arrays工具类排序
摘要:参考代码:import java.util.Arrays;import java.util.Scanner;public class Main1128 { public static void……
未调用系统函数,相看过程的同学速来……
摘要:解题思路:别人的函数是个“黑箱子”!原理还得自己摸索;注意事项:指针操作较多,有点绕参考代码#include<stdio.h>void bdx(int *a , int *b );//自定义函数,比较……