题解列表

筛选

1865: 换硬币

摘要:解题思路:像走台阶一样枚举。注意事项:参考代码:#include<bits/stdc++.h> using namespace std; int a[20]={0},s=0,n=0; void ……

C语言训练-"水仙花数"问题1

摘要:解题思路:    简单的提取三个位数的数字,用一般的if语句即可解决注意事项:   if判断语句中注意是==,若写成=,则是赋值,会导致判断语句始终>1,结果恒为1参考代码:#include<stdi……

问题一“水仙花数”C语言

问题在于取位(个位,十位,百位)​**/**取商​**%**取余可以从个位开始或者百位开始,按个人喜好#includeintmain(){intinput,save_one,save_two,save_three;scanf("%d",&input);save_one=input/100;//3.71

1029: [编程入门]自定义函数处理素数

解题思路:如果能被别的数整除,则输出notprime,并结束;循环做完后,若没有输出notprime,则它是素数,所以输出prime。注意事项:注意第一个return0;参考代码:#includeusingnamespacestd;intmain(){intn;cin>>n;for

2629——————数学题

摘要:注意事项:        pow() 方法返回 x,y(x 的 y 次方) 的值。参考代码:p,m = map(int,input().split())……

while 连续输入值(简单的a+b)

摘要:解题思路:使用while 语句输入的小技巧注意事项:注意连续输入参考代码:#include<stdio.h>int main(){    int a,b,t;    while(scanf("%d %……

输出 Hello World! 超简单

摘要:解题思路:没什么技巧,注意输出格式注意事项:格式参考代码:#include<stdio.h>int main(){    printf("**************************\n");……