115
reputation
6

hasan

// http://www.spoj.com/problems/ANARC08H/
int n,k,d,i;
while (cin>>n>>k && n != 0) {
    for (d=1,i=1; i<=n; d = (d + k) % i++);
    cout << n << " " << k << " " << d+1 << endl;
}

Virgin Mobile UAE

hasanal_bukhari [AT] hotmail [DOT] com

http://poj.org/userstatus?user_id=hasan83

0
answers
2
questions
~77
people reached
  • Amman, Jordan
  • Member for 6 years, 2 months
  • 10 profile views
  • Last seen Jun 14 '19 at 15:19

Top tags (3)

Score 0
Posts 1
Score 0
Posts 1
Score 0
Posts 1

Top posts (2) All Questions Answers | Votes Newest

Badges (6)

Gold

Silver

Bronze

6

Rarest