Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6333773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:31:41+00:00 2026-05-24T18:31:41+00:00

I discovered this website where you submit your solution and the puzzle master processes

  • 0

I discovered this website where you submit your solution and the “puzzle master” processes it and verifies it. I have two solutions, both of which work fine on my compiler and yet the “puzzle master” is rejecting them.

Solution 1: Brute Force

 #include <iostream>
using namespace std;

int main()
{
int s=0,i;
for(i=1;i<1000;i++)
        if(i%3==0 || i%5==0)
                s=s+i;
cout<<s<<endl;
return 0;
}

Error:

'g++ -lm -lcrypt -O2 -I/usr/include/mysql -DBIG_JOINS=1 -fno-strict-aliasing -DUNIV_LINUX -DUNIV_LINUX -Wl,-Bsymbolic-functions -rdynamic -L/usr/lib/mysql -lmysqlclient  euler1.cc -o euler1
euler1.cc:14: error: expected class-name at end of input
make: *** [all] Error 1'

Solution 2: Using closed form

#include <iostream>
using namespace std;

int main()
{
int k=1000, j=1000/3,l=1000/5,m=1000/15;
k=3*(j*(j+1)/2)+5*(l*(l-1)/2)-15*(m*(m+1)/2);
cout<<k<<endl;
return 0;
}

Error:

g++ -lm -lcrypt -O2 -I/usr/include/mysql -DBIG_JOINS=1 -fno-strict-aliasing -DUNIV_LINUX -DUNIV_LINUX -Wl,-Bsymbolic-functions -rdynamic -L/usr/lib/mysql -lmysqlclient  euler1.cc -o euler1
2.euler1.cc:15: error: expected class-name before â~â token
3.make: *** [all] Error 1

Are these errors caused by my code, or the website?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T18:31:42+00:00Added an answer on May 24, 2026 at 6:31 pm

    If you submitted your code using the online editor, I guess it simply did not compile.

    Indeed the online editor allows submissions only for interpreted languages, whereas compiled languages must be provided via file upload, along with a Makefile or an Ant file that indicates the judge how to compile it.

    It is a bit confusing indeed that the online editor allows you to choose syntax coloring for languages such as C++ and Java, although submitting the resulting code will fail in all cases.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've recently discovered a website which does something really cool! Example: There are two
I've discovered this folder in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files and have a few questions. What
I've seen a plugin for Vim called AutoClose (discovered from this post) which automatically
I have recently discovered that I am affected by this bug http://www.mail-archive.com/mono-bugs@lists.ximian.com/msg71515.html Well, at
I have a web site in asp.net that uses a master page. In this
We have an ASP Classic website running on Windows Server 2003 and IIS6 which
I have a wordpress website which suddenly stopped working today. When I look at
Having recently discovered this method of development, I'm finding it a rather nice methodology.
I've discovered this idiom recently, and I am wondering if there is something I
I just discovered this component and started working with it. I understand that the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.