#2956: 第1001行出錯= =


aacby321 (foreverlove)


在第1001出錯了...怎麼會前1000都對,第1001錯....這...

#include<iostream>
#include<math.h>
using namespace std;
int main()
{int a,n,p,ts,tl,its,itl,s6;
   while (cin>>a)
   for (int b=0; b<a; b++)
     {
       cin>>n>>p;
       tl=(n*p*812 - 1) / 1000 + 1;
       if (tl>(int)tl)
         tl=(int)tl+1;
      
       s6=n/2;
       n=n-s6;
       ts=(s6*0.6*p)+(n*p);
       if (ts>(int)ts)
         ts=(int)ts+1;
    
       if (ts>tl)
         cout<<"8-12=-4\n";
       else if (ts<tl)
         cout<<": )\n";
       else if (ts==tl)
         cout<<"SAME\n";
    
     }
 system("pause");
 return 0;
}