forked from wotjd4305/Algorithm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswe3233.java
More file actions
35 lines (25 loc) · 711 Bytes
/
swe3233.java
File metadata and controls
35 lines (25 loc) · 711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import java.util.Scanner;
public class swe3233 {
static Scanner sc = new Scanner(System.in);
static long answer = 0;
public static void main(String[] args)
{
solution();
}
public static void solution()
{
int t = sc.nextInt();
for(int T=1; T<=t; T++) {
int A = sc.nextInt();
int B = sc.nextInt();
answer = Print_value(A,B);
System.out.println("#" + T + " " + answer);
}
}
public static long Print_value(int A, int B)
{
double valueToPow = Math.round(A/B);
double result = Math.pow(valueToPow, 2.0);
return Math.round(result);
}
}