1 条题解

  • 0
    @ 2025-12-5 12:25:25

    C :

    #include<stdio.h>
    int main()
    {
    int x,y;
    double f;
    scanf("%d%d",&x,&y);
    f=(87*x+85*y)/(1.0*(x+y));
    printf("%0.1lf",f);
    }
    

    C++ :

    #include<iostream>
    #include<cstdio>
    using namespace std;
    int main()
    {
    	int x1,y1;
    	cin>>x1>>y1; 
    	printf("%0.1f\n",float(x1*87+y1*85)/(x1+y1)); 
    	return 0;
    }
    
    

    Python :

    # coding=utf-8
    x,y = map(int, input().split())
    t=(x*87+y*85)/(x+y)
    print('%.1f'%t)
    
    • 1

    信息

    ID
    9
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者