10250번

· 백준
코드#include #include using namespace std;int tc, a[3];int main() { cin >> tc; while(tc--) { string res; fill(a, a + 3, 0); for(int i = 0; i > a[i]; int floor = (a[2] - 1) % a[0] + 1; // 0 기반으로 구하기 int room = (a[2] - 1) / a[0] + 1; // 0 기반으로 구하기 res = to_string(floor) + (room 풀이 1기반으로 해결하려고 하다가 엣지 케이스에서 털리던 중에, 0기반으로 해결하면 된다는 사실을 알았다. 0기반 인덱싱을 사용하면 인..