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 7618711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:28:36+00:00 2026-05-31T03:28:36+00:00

So basically, I have something like this – Input file with 2 integers. Code,

  • 0

So basically, I have something like this –
Input file with 2 integers.
Code, something like this –

#include <iostream>
#include <fstream>
using namespace std;
int main() {
  unsigned long long n, k;
  ifstream input_file("file.txt");
  input_file >> n >> k;
  if(n >= 10^9 || k >= 10^9) {
    cout << "0" << endl;
  }
  return 0;
}

So, is there any chance to check if any of theese two integers are bigger than 10^9? Basically, if I assign thoose integers to unsigned long long, and if they are bigger than 10^9, they automatically turn to some random value, that fits inside unsigned long long, am I right, and that means that there is no chance to check it, or am I’m missing something?

  • 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-31T03:28:37+00:00Added an answer on May 31, 2026 at 3:28 am

    On most platforms, an unsigned long long will be able to store 109 with no problem. You just need to say:

    if (n >= 1000000000ull)

    If an unsigned long long is 64-bits, for example, which is common, you can store up to 264

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

Sidebar

Related Questions

I basically have something like this: void Foo(Type ty) { var result = serializer.Deserialize<ty>(inputContent);
So basically I have something like this <div class=iframe-holder> <span></span> <iframe src=iframe.html width=200 height=200
I basically have something like this: class CGlToolBase { public: CGlToolBase(void) { } virtual
Basically I have something like this: public void Form1_btnStart_click() { Void1() NextLine } Public
Lets say I have something like this: http://gyazo.com/642987562175afc6d11a962762327744.png?1329570534 Basically, the user fills out this
Basically, I have something like this: $.ajax({ type: GET, url: my_url, cache: true, success:
I have something like this: I am using Ajax.BeginForm and its updatetargetid is a
Basically I have something like this: UPDATE Table SET Table.col1 = other_table.col1, FROM Table
So basically I have something like this: private SortedDictionary<Priority, List<String>> example = new SortedDictionary<Priority,
If I have something like this: $(.jq_elements).children(input).click(function() How do I add another selector to

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.