题解列表

筛选

数组模拟计算,嘎嘎猛,思维难度低,

摘要:怎么模拟进位呢? 比如有一个数组a[100] , a[1]表示个位数上的数值,a[2]表示十位数的数值,以此类推。 初始化数组中每个元素为0,再给a[1]赋值。假设a[1]=3,定义一个int型变……

c语言代码解决问题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char str[201]; gets(str); str[strlen(s……

c语言代码解决问题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int min(int x, int y){    return x < y?x : y;}int main(){    int a, ……

c语言代码解决问题

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

1074:-数字整除

摘要:解题思路:本题的本质是高精度大数除以低精度小数。字符型的的本质就是整形数据。以字符串的形式接收高精度大数,把每一个字符转变为数字存放在数组中进行运算。注意事项:参考代码:char a[1000]; ……

C++简单解含k个3的数

摘要:#### 解题思路 先设置一个循环对输入的m进行取模,如果它等于3,那么count计数器就++; 然后再通过逻辑表达式对满足条件的的m进行判断(输出"YES"还是"NO") #### 注意事项 ……

阶乘数列1064

摘要:解题思路:注意事项:参考代码:public class Main {    public static void main(String args[]) {        double sum = 0……

c语言代码解决问题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int least_num(int a,int b){    return a%b==0 ? b : least_num(b, a % ……

c语言代码解决问题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int c, n, i;    scanf("%d", &c);    while (c--)    { ……