Created
October 2, 2019 16:13
-
-
Save surinoel/dab0f7a732b23932caa35ac15abb4745 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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