头像

Ferrynan




离线:10天前


最近来访(39)
用户头像
凌尘
用户头像
815741912
用户头像
Ton_3
用户头像
666ldc
用户头像
Absama_4
用户头像
啦啦allla
用户头像
漫长_2
用户头像
const_static
用户头像
世蒂
用户头像
想睡觉的人
用户头像
h.john
用户头像
alterxie
用户头像
a_zi_ge
用户头像
看破不点破
用户头像
Payphone
用户头像
jdysya
用户头像
ღSupperღ
用户头像
ZPLAYER
用户头像
JiangMY
用户头像
PPheng


Ferrynan
1个月前

C++ 代码

#include<bits/stdc++.h>
using namespace std;
int main()
{
    double b[12][12],s=0;
    char a;
    cin>>a;
    for(int i=0;i<12;i++)
    {
        for(int j=0;j<12;j++)
        {
            cin>>b[i][j];
            if(i<=5)
            {
                if(j<i)
                s+=b[i][j];
            }
            else
            {
                if(i+j<=10)
                s+=b[i][j];
            }
        }
    }
    if(a=='S')
    printf("%.1lf",s);
    else
    printf("%.1lf",s*1.000/30);
    return 0;
}



Ferrynan
1个月前

C++ 代码

#include<bits/stdc++.h>
using namespace std;
int main()
{
    double b[12][12],s=0;
    char a;
    cin>>a;
   int start,end;
    for(int i=0;i<12;i++)
    {
        for(int j=0;j<12;j++)
        {
            cin>>b[i][j];

        }
    }
     for(int i=0;i<12;i++)
    {
        start=i+1;
        end=11-i;
        for(int j=start;j<end;j++)
        {

            s+=b[i][j];
        }
    }

    if(a=='S')
    printf("%.1lf",s);
    else
    printf("%.1lf",s*1.000/30);
    return 0;
}

copy到的巨简洁的代码

#include <iostream>
using namespace std;
int main()
{
    char c;
    cin>>c;
    double a,res=0;
    for(int i=0;i<12;i++)
        for(int j=0;j<12;j++)
        {
            cin>>a;
            if(j>i&&i+j<11)res+=a;
        }
    printf("%.1lf",c=='S'?res:res/30);
}



Ferrynan
1个月前

C++ 代码

#include<bits/stdc++.h>
using namespace std;
int main()
{
    double b[12][12],s=0;
    char a;
    cin>>a;

    for(int i=0;i<12;i++)
    {
        for(int j=0;j<12;j++)
        {
            cin>>b[i][j];

        }
    }
     for(int i=0;i<12;i++)
    {
        for(int j=0;j<11-i;j++)
        {

            s+=b[i][j];
        }
    }

    if(a=='S')
    printf("%.1lf",s);
    else
    printf("%.1lf",s*1.000/66);
    return 0;
}



Ferrynan
1个月前

C++ 代码

#include<bits/stdc++.h>
using namespace std;
int main()
{
    double b[12][12],s=0;
    char a;
    cin>>a;
    for(int i=0;i<12;i++)
    {
        for(int j=0;j<12;j++)
        {
            cin>>b[i][j];
            if(j>i)
            s+=b[i][j];
        }
    }
    if(a=='S')
    printf("%.1lf",s);
    else
    printf("%.1lf",s*1.000/66);
    return 0;
}



Ferrynan
1个月前

C++ 代码

#include<bits/stdc++.h>
using namespace std;
int main()
{
   int l;
   double s=0;
   cin>>l;
   char a;
   cin>>a;
   double b[12][12];
   for(int i=0;i<12;i++)
   {
       for(int j=0;j<12;j++)
       {
           cin>>b[i][j];
           if(i==l)s+=b[i][j];
       }
   }
   if(a=='S')
   printf("%.1lf",s);
   else
   printf("%.1lf",s*1.000/12);
   return 0;

}



Ferrynan
1个月前

C++ 代码

#include<bits/stdc++.h>
#include<cstring>
using namespace std;
int main()
{
    double a[101];

    for(int i=0;i<100;i++)
    {
        cin>>a[i];
        if(a[i]<=10)
        printf("A[%d] = %.1lf\n",i,a[i]);
    }
    return 0;
}



Ferrynan
1个月前

C++ 代码

#include<bits/stdc++.h>
using namespace std;
int main()
{
   int v,s;
   cin>>v;
   s=v;
   int N[60];
   for(int i=0;i<10;i++)
   {
       printf("N[%d] = %d\n",i,s);
       s=2*s;
   }
   return 0;
}



Ferrynan
1个月前

C++ 代码

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int a[10];
    for(int i=0;i<10;i++)
    cin>>a[i];
    for(int i=0;i<10;i++)
    {
        if(a[i]<=0)
        a[i]=1;
       printf("X[%d] = %d\n",i,a[i]);
    }
    return 0;
}



新鲜事 原文

Ferrynan
1个月前
以为会是陪跑,结果是省三
图片


新鲜事 原文

Ferrynan
1个月前
留念
图片