Search found 2 matches

by cccc
Fri Sep 19, 2003 3:04 am
Forum: Volume 103 (10300-10399)
Topic: 10346 - Peter's Smokes
Replies: 46
Views: 24295

thanks, I got AC
by cccc
Thu Sep 18, 2003 6:11 am
Forum: Volume 103 (10300-10399)
Topic: 10346 - Peter's Smokes
Replies: 46
Views: 24295

10346 - WA

#include <iostream>
using namespace std;

int main()
{
int a[100],b[100],c,i,j,k=0;
while(cin >> i >> j)
{
a[k]=i;b[k]=j;k++;
}
for(int l=0;l<k;l++)
{
c=a[l];
for(int m=a[l];m>=b[l];m)
c+=m=m/b[l];

cout << c << endl;
}

}

Go to advanced search