跳到正文

题解

某人的物理练习(practice‌)题解

Aphre约 1 分钟
原文
文章信息与版本

文章信息

发布
2026年11月16日
收录
2026年11月16日
更新
2026年11月16日
篇幅
约 1 分钟

版本

  1. v1当前

做法分析

按照题目所给提示模拟操作计算即可。注意计算过程中如果全为整数类型就加个 double( int等整数类型 ),或者乘上 1.01.0 转成 double。

AC Code

C++
#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,t,v,a;
    cin>>n>>t;
    cout<<fixed<<setprecision(2);
    while(n--){
        cin>>v>>a;
        cout<<v*t+0.5*a*t*t<<" "<<v*1.0+a*t<<"\n";
    }
}
原文