题解列表

筛选

一行就够了

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

年龄与疾病

摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main {     public static void main(String[]args……

汽水瓶(Java代码)

摘要: /*此题需不断输入n的值,故while循环更简便,因需判断n的范围,而按顺序需先输入n,则使用dowhile循环。因每2个空瓶借1瓶便抵消一瓶,故2瓶算作1瓶,同时1瓶无法兑换,所以可以看作换……

题解 1738: 排序

摘要:下面是选择排序 #include using namespace std; int a[5010]; int main() { int n; ……

c语言递归解法

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

要用long long

摘要:解题思路:注意事项:参考代码:#include<stdio.h>long long cal(int i){    if(i==1)    {        return 1;    }else{   ……

遍历三位数暴力解法

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    for(int i=100;i<1000;i++)    {        int k=i;       ……

直接格式输出

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

找规律解决时间超限

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    long long n;    scanf("%lld",&n);    long long a[3000……

2903: 不高兴的津津c语言题解

摘要:解题思路:设立二维数组存储数据,在输入后用数组day[7]存判断循环中的时长最多的那天,最后判断时长是否大于8,然后输出。注意事项:参考代码:#include<stdio.h>int main(){ ……