头像

kokozeng


访客:3688

离线:3个月前


活动打卡代码 AcWing 611. 简单计算

kokozeng
5个月前
#include<iostream>  
#include<cstdio>

using namespace std;  

int main()  
{  
    int id1, number1, id2, number2;
    double value1, value2;
    scanf("%d%d%lf", &id1, &number1, &value1);
    scanf("%d%d%lf", &id2, &number2, &value2);
    printf("VALOR A PAGAR: R$ %.2lf\n", number1 * value1 + number2 * value2);

    return 0;  
}


活动打卡代码 AcWing 605. 简单乘积

kokozeng
5个月前
#include<iostream>  
#include<cstdio>

using namespace std;  

int main()  
{  
    int a, b;
    cin >> a >> b;
    cout << "PROD = " << a * b << endl;
    return 0;  
}


活动打卡代码 AcWing 654. 时间转换

kokozeng
5个月前
#include<iostream>  
#include<cstdio>

using namespace std;  

int main()  
{  
    int n;
    cin >> n;
    printf("%d:", n / 3600);
    n = n % 3600;
    printf("%d:", n / 60);
    n = n % 60;
    printf("%d\n", n);
    return 0;  
}


活动打卡代码 AcWing 653. 钞票

kokozeng
5个月前
#include<iostream>  
#include<cstdio>

using namespace std;  

int main()  
{  
    int n;
    cin >> n;
    cout << n << endl;
    printf("%d nota(s) de R$ 100,00\n", n / 100);
    n %= 100;
    printf("%d nota(s) de R$ 50,00\n", n / 50);
    n %= 50;
    printf("%d nota(s) de R$ 20,00\n", n / 20);
    n %= 20;
    printf("%d nota(s) de R$ 10,00\n", n / 10);
    n %= 10;
    printf("%d nota(s) de R$ 5,00\n", n / 5);
    n %= 5;
    printf("%d nota(s) de R$ 2,00\n", n / 2);
    n %= 2;
    printf("%d nota(s) de R$ 1,00\n", n);

    return 0;  
}


活动打卡代码 AcWing 616. 两点间的距离

kokozeng
5个月前
#include<iostream>  
#include<cstdio>
#include<cmath>

using namespace std;  

int main()  
{  
    double x1, x2, y1, y2;
    scanf("%lf%lf", &x1, &y1);
    scanf("%lf%lf", &x2, &y2);
    printf("%.4lf", sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)));

    return 0;  
}


活动打卡代码 AcWing 615. 油耗

kokozeng
5个月前
#include<iostream>  
#include<cstdio>

using namespace std;  

int main()  
{  
    int km;
    double oil;
    scanf("%d%lf", &km, &oil);
    printf("%.3lf km/l\n", km/oil);
    return 0;  
}


活动打卡代码 AcWing 609. 工资

kokozeng
5个月前
#include<iostream>  
#include<cstdio>

using namespace std;  

int main()  
{  
    int number, hour;
    double cash;

    scanf("%d%d%lf", &number, &hour, &cash);
    printf("NUMBER = %d\nSALARY = U$ %.2lf",number, hour * cash);

    return 0;  
}


活动打卡代码 AcWing 606. 平均数1

kokozeng
5个月前
#include<iostream>  
#include<cstdio>

using namespace std;  

int main()  
{  
    double a, b;
    scanf("%lf%lf", &a, &b);
    double c;
    c = (a * 3.5 + b * 7.5) / 11;
    printf("MEDIA = %.5lf", c);
    return 0;  
}


活动打卡代码 AcWing 604. 圆的面积

kokozeng
5个月前
#include <iostream>
using namespace std;

int main()
{
    double pi = 3.14159, R;
    scanf("%lf", &R);
    printf("A=%.4lf\n", pi * R * R);
    return 0;

}


活动打卡代码 AcWing 608. 差

kokozeng
5个月前
#include <iostream>
using namespace std;

int main()
{
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    cout << "DIFERENCA = " << a * b - c * d << endl;

    return 0;
}