i am embarassed to get a WA on such an easy question but i don't know why . please check following :
#include <iostream>
#include <cmath>
using namespace std;
int main(int argc, char *argv[]){
long long int a,b;
while(cin >> a >> b){
cout << abs(b- a) << endl;
}
return 0;
}
Search found 4 matches
- Sun Jun 02, 2013 8:24 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10055 - Hashmat the Brave Warrior
- Replies: 166
- Views: 77834
- Fri May 24, 2013 7:19 pm
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 320819
Re: UVA 100 : 3n +1 : Runtime error.
phew, thanx, accepted at last !
AC !
AC !
- Fri May 24, 2013 7:09 pm
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 320819
Re: UVA 100 : 3n +1 : Runtime error.
i haven't taken care of that, but that is really a stupid input which i am not expecting at all ....
but if that is the case, what we need to do ?
but if that is the case, what we need to do ?
- Thu May 23, 2013 7:19 pm
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 320819
UVA 100 : 3n +1 : Runtime error.
Here is my code, can you help me in figuring out why this is a Runtime error !
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cstring>
using namespace std;
int *ar,*arr;
int find(unsigned int a,unsigned int u,unsigned int uu){
int n=1;
while(a!=1){
if(a<=uu && a>=u && ar[a ...
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cstring>
using namespace std;
int *ar,*arr;
int find(unsigned int a,unsigned int u,unsigned int uu){
int n=1;
while(a!=1){
if(a<=uu && a>=u && ar[a ...