1 条题解
-
0
C++ :
#include<bits/stdc++.h> using namespace std; int main(){ double n,x,y; cin>>n>>x>>y; cout<<(int)((n * 1000 + y * 10) / (x * 10 + y * 10)); return 0; }Pascal :
var a,b,c,d:real; begin read(a,b,c); a:=a*100; a:=a-b; d:=trunc(a/(b+c)); d:=d+1; write(d:0:0); end.Java :
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); double n = sc.nextDouble(); double x = sc.nextDouble(); double y = sc.nextDouble(); double c = n * 100; double b = x + y; int a = 0; if((n * 100) % (x + y) >= x){ a =(int) (c / b + 1); }else{ a =(int)( c / b); } System.out.println(a); } }Python :
sr=input().split() n=float(sr[0])*100 k=float(sr[1]) j=float(sr[2]) m=n//(k+j) y=n%(k+j) if y>=k: print("%d"%(m+1)) else: print("%d"%m)
- 1
信息
- ID
- 311
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者