Poj_1045
这道题难点在于基本物理知识和数学的结合。
得出公式后再code,那就是小菜一碟了。
import java.util.Scanner;
import java.lang.Math; public class N1045 {
static double vs;
static double r;
static double c;
static double w;
static double vr;
static int n; public static void main(String[] args){
// TODO Auto-generated method stub Scanner cin=new Scanner(System.in);
vs=cin.nextDouble();
r=cin.nextDouble();
c=cin.nextDouble();
n=cin.nextInt();
for(int i=0;i<n;i++){
w=cin.nextDouble();
vr=(vs*c*r*w)/(Math.sqrt(1+Math.pow(c*r*w,2.0)));
System.out.printf("%.3f\n",vr);
}
}
}
版权声明:本文为博主原创文章,未经博主允许不得转载。
Poj_1045的更多相关文章
随机推荐
- 【基于rssi室内定位报告】rssi分布情况标识位置
import matplotlib matplotlib.use('Agg') import numpy as np from numpy import array from matplotlib i ...
- 为什么不写 @RequestParam 也能拿到参数?
三种写法,test(String name), test(@RequestParam String name), test(@RequestParam("userName") St ...
- Django 模型系统(model)&ORM--基础
ORM 映射关系: 类 ---> 表 属性 ---> 字段 对象 --->一条数据 创建表(建立模型) 实例:我们来假定下面这些概念,字段和关系 作者模型:一个作者有姓名和年龄. 作 ...
- 查看mysql支持的存储引擎
查看mysql支持的存储引擎 show engines\G;
- rails dependent
dependent 可以設定當物件刪除時,也會順便刪除它的 has_many 物件: class Event < ActiveRecord::Base has_many :attendees, ...
- 高性能js之数据访问性能
js中si中基本数据访问: 直接量, 变量, 数组项, 对象成员 性能问题: 首先要理解作用域链的基本概念,例如,当一个函数被创建时,就会产生一个激活对象(AO对象),AO对象中存储了该函数中所有的属 ...
- tornado源码分析
初识tornado 首先从经典的helloword案例入手 import tornado.ioloop import tornado.web class MainHandler(tornado.web ...
- hd acm1061
Problem Description Given a positive integer N, you should output the most right digit of N^N. Inp ...
- mysql 的类型转换函数cast的用法
CAST(expr AS type), CONVERT(expr,type) , CONVERT(expr USING transcoding_name) CAST() ...
- Shiro-自定义realm
Shiro自定义 realm package com.zhen.realm; import org.apache.shiro.authc.AuthenticationException; import ...