题解列表

筛选

c语言利用数组

摘要:解题思路:#includeint main(){    int month_consume[12]; //每月的消费    int month_save=0;   //单月的剩余    float a……

C语言调用函数求阶乘

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>long long fun(int x){ long long y=0; if(x==1) retu……

C语言简单for循环求阶乘

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){    long long a,b=1,sum=0;    int i; scanf("%lld",&a); f……

1866:三位数反转(C++)

摘要:解题思路:百位数为i/100;十位数为1/10-i/100*10;个位数为i-i/100*100-(i/10-i/100*10)*10注意事项:此题目含“有多组测试数据”则需要用循环结构参考代码:#i……

编写题解 1160: 出圈(队列)

摘要:解题思路:把m-1个数加到后面之后,删除第一个数即可注意事项:参考代码:while True:    try:        n,m = map(int,input().split())       ……

感觉不错的方法

摘要:解题思路:用布尔函数判断是否为素数注意事项:参考代码:#include<iostream>using namespace std;int main(){    int a = 0;    cin >>……

for循环简单解题

摘要:解题思路:注意事项:是s【f-1】,不是s【i-】哦!!!参考代码:#include <bits/stdc++.h>using namespace std;int main(){ string s; ……

编写题解 2779: 输出绝对值

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