按题意输出答案即可
import math
T = int(input())
for i in range(T):
x = int(input())
print(int(10 * math.sqrt(x)))
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
while(T-->0){
int number =sc.nextInt();
System.out.println((int)(10*Math.sqrt(number)));
}
}
}
#include <iostream>
#include <math.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int T;
cin >> T;
while (T--)
{
int x;
cin >> x;
cout << (int)(10 * sqrt(x)) << endl;
}
return 0;
}
众所周知,“根号乘十法”是一种优秀的让同学们及格的方法。
假设你原来考了x分,那么你在“根号乘十法”作用后的分数就是[10x]
现在给定原始分数,请你输出作用后的分数。
本题中,每个测试点包含多组测试数据。
第一行一个整数T(1≤T≤101),表示数据的组数。
对于每组数据:
第一行一个整数x(0≤x≤100),表示原始分数。
对于每组数据,输出一行一个整数,表示“根号乘十法”作用后的分数。
祝您考试顺利~
输入
3
0
36
100
输出
0
60
100