Hi can anyone point me in the right direction, I'm not sure why i'm getting wrong answer? It passes on given test cases
#include <fstream>
#include <map>
#include <iostream>
using namespace std;
int main()
{
// ifstream in("loan.in");
// ofstream out("loan.out");
int duration;
double ...
Search found 3 matches
- Tue Jun 04, 2013 3:31 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10114 - Loansome Car Buyer
- Replies: 38
- Views: 21379
- Sun May 26, 2013 6:16 am
- Forum: Volume 100 (10000-10099)
- Topic: 10055 - Hashmat the Brave Warrior
- Replies: 166
- Views: 77565
10055 - Hashmat the Brave Warrior - Query
This code passes
#include <iostream>
#include <cstdlib>
using namespace std;
int main ()
{
long long a, b;
while(cin >> a >> b)
{
if (cin.eof())
return 0;
cout << abs(a-b) << endl;
}
}
This code doesn't
#include <iostream>
#include <cmath>
using namespace std;
int main ...
#include <iostream>
#include <cstdlib>
using namespace std;
int main ()
{
long long a, b;
while(cin >> a >> b)
{
if (cin.eof())
return 0;
cout << abs(a-b) << endl;
}
}
This code doesn't
#include <iostream>
#include <cmath>
using namespace std;
int main ...
- Fri May 24, 2013 6:05 pm
- Forum: Volume 115 (11500-11599)
- Topic: 11559 - Event Planning
- Replies: 29
- Views: 15324
Re: 11559 Event planning
Hi, I seem to be getting WA but my code passes given test cases and the one below.
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <cstdio>
using namespace std;
int main ()
{
int N, B, H, W;
while (scanf("%d %d %d %d", &N, &B, &H, &W) == 4 ...
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <cstdio>
using namespace std;
int main ()
{
int N, B, H, W;
while (scanf("%d %d %d %d", &N, &B, &H, &W) == 4 ...