题解 1239: 班级人数

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

班级人数(模拟)

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>usingnamespacestd;intmain(){ d……

1239: 班级人数

```cpp#includeusingnamespacestd;floatleast_stu(floata,floatb){intN=1;boolflag=false;while(!flag){for(intn=1;n

班级人数(加油哟!)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ double p,q; int k,n; while( scanf("%lf %……
优质题解

Hifipsysta-1239-班级人数(C++代码)建立三个不等式,搜索符合条件的答案

#####解题思路:本题的思路是要找到一个最小的班级人数$$N$$,这个$$N$$满足如下条件:①给定一个比例的范围,存在某个整数$$n$$,使得$$n$$个人及格的及格率$$\frac{n}{N}$$能够落在这个区间里面。②只要增加1个人数就不能落在区间里面③只要减少1个人数就不能落在区间里面综上所

题解 1239: 班级人数

摘要:参考代码:#include<stdio.h>#include<string.h>int main(){   float a,b;   float i,j;   here:   while(scanf(……

直接循环(Python)

摘要:while 1:    list1=list(map(float,input().split()))    if len(list1)==0:        break    P=list1[0]/1……

班级人数 (C语言代码)

摘要:解题思路:        方法1:        假设当班级有x人时,一定会有y人及格(y<x)。使y/x的值大于P%,小于Q%,直接暴力,不想那么多。结果也AC了。    方法2:        再……

班级人数 (C++代码)

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() { float a,b; while(cin>>a>>……

班级人数 (Java代码)

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