#include <stdio.h>
int main( ) {
int t, x;
// Input the length of the track (t) and the distance the runner ran (x)
printf ( "Enter the length of the track in meters (t): " ) ;
printf ( "Enter the distance the runner ran in meters (x): " ) ;
// Calculate the number of complete laps the runner ran
int laps = x / t;
// Calculate the remaining meters to complete the next lap
int remainingMeters = x % t;
// Output the result
printf ( "The runner ran %d laps.\n " , laps
) ; printf ( "The runner needs %d more meters to complete the next lap.\n " , t
- remainingMeters
) ;
return 0 ;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpIHsKICAgIGludCB0LCB4OwogICAgCiAgICAvLyBJbnB1dCB0aGUgbGVuZ3RoIG9mIHRoZSB0cmFjayAodCkgYW5kIHRoZSBkaXN0YW5jZSB0aGUgcnVubmVyIHJhbiAoeCkKICAgIHByaW50ZigiRW50ZXIgdGhlIGxlbmd0aCBvZiB0aGUgdHJhY2sgaW4gbWV0ZXJzICh0KTogIik7CiAgICBzY2FuZigiJWQiLCAmdCk7CiAgICAKICAgIHByaW50ZigiRW50ZXIgdGhlIGRpc3RhbmNlIHRoZSBydW5uZXIgcmFuIGluIG1ldGVycyAoeCk6ICIpOwogICAgc2NhbmYoIiVkIiwgJngpOwogICAgCiAgICAvLyBDYWxjdWxhdGUgdGhlIG51bWJlciBvZiBjb21wbGV0ZSBsYXBzIHRoZSBydW5uZXIgcmFuCiAgICBpbnQgbGFwcyA9IHggLyB0OwogICAgCiAgICAvLyBDYWxjdWxhdGUgdGhlIHJlbWFpbmluZyBtZXRlcnMgdG8gY29tcGxldGUgdGhlIG5leHQgbGFwCiAgICBpbnQgcmVtYWluaW5nTWV0ZXJzID0geCAlIHQ7CiAgICAKICAgIC8vIE91dHB1dCB0aGUgcmVzdWx0CiAgICBwcmludGYoIlRoZSBydW5uZXIgcmFuICVkIGxhcHMuXG4iLCBsYXBzKTsKICAgIHByaW50ZigiVGhlIHJ1bm5lciBuZWVkcyAlZCBtb3JlIG1ldGVycyB0byBjb21wbGV0ZSB0aGUgbmV4dCBsYXAuXG4iLCB0IC0gcmVtYWluaW5nTWV0ZXJzKTsKICAgIAogICAgcmV0dXJuIDA7Cn0=