import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for(int i=0; i<t; i++) {
int h = sc.nextInt();
int w = sc.nextInt();
int n = sc.nextInt();
int floor;
int number;
if(n%h == 0) {
floor = h;
number = n/h;
} else {
floor = n%h;
number = n/h + 1;
}
System.out.println(100*floor + number);
}
sc.close();
}
}
n%h 이 0일 때를 고려해야 함!!