문제 링크
#include <iostream> using namespace std; int main() { int P, K, cnt=1; cin >> P >> K; while (P != K) { K++; cnt++; } cout << cnt; }
풀이 loop문 활용