Skip to content

Instantly share code, notes, and snippets.

@surinoel
Created October 2, 2019 16:13
Show Gist options
  • Save surinoel/dab0f7a732b23932caa35ac15abb4745 to your computer and use it in GitHub Desktop.
Save surinoel/dab0f7a732b23932caa35ac15abb4745 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int tc;
cin >> tc;
while (tc--) {
int n, m, k;
cin >> n >> m >> k;
int a = k / n;
if (k % n == 0) {
cout << (n * 100) + (k / n) << '\n';
}
else {
a += 1;
int b = k % n;
cout << (b * 100) + a << '\n';
}
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment