#include<iostream>
#include<cstdio>
#include<cmath>
#define ll long long
using namespace std;
int main()
{
int t;
scanf("%d",&t);
for(int k=;k<=t;k++)
{
ll n;
scanf("%lld",&n);
ll ans=n-(ll)sqrt((double)n)-(ll)sqrt((double)n/);
printf("Case %d: %lld\n",k,ans);
}
return ;
}

I've been working overtime for a long time , I've been thinking about how to use bit operations to reduce time , Finally, I have no choice but to see the answer , It turns out there's a formula !!!

Many of the topics in number theory are in a set of formats , Know the formula in one step , I don't know. I can't think of death

lightoj1336 More articles on the basis of number theory

  1. You can also draw a QR code by hand ( Two ) Error correcting codeword algorithm : The basis of number theory and Galois field GF(2^8)

    Abstract : This paper explains the basic knowledge of mathematical number theory used in two-dimensional code error correction codeword generation , Galois domain (Galois Field)GF(2^8), This is the theoretical basis of hand-painted two-dimensional code filling grid , If you don't want to go deep, you can just skip . At the same time, the basis of number theory is also Hash Algorithm ,RS ...

  2. 「kuangbin Take you fly 」 Topic 14 The basis of number theory

    layout: post title: 「kuangbin Take you fly 」 Topic 14 The basis of number theory author: "luowentaoaa" catalog: true tags: mathj ...

  3. Summary of basic algorithms of number theory (python edition )

    /* Author: wsnpyo Update Date: 2014-11-16 Algorithm: Fast power /Fermat, Solovay_Stassen, Miller-Rabin Primality test /E ...

  4. from BZOJ2242 Look at the basic algorithm of number theory : Fast power ,gcd,exgcd,BSGS

    LINK It's actually three boards 1. Fast power Fast power , Optimize exponentiation by converting exponents into binary bits , Basic knowledge of 2.gcd and exgcd gcd It's called division by rotation , It's shown here in the form of mold taking \(gcd(a,b)\) ...

  5. 1370 - Bi-shoe and Phi-shoe(LightOJ1370)( The basis of number theory , Euler function )

    http://lightoj.com/volume_showproblem.php?problem=1370 Euler function : In number theory , Right integer n, Euler function is less than or equal to n In the number of and n The number of Coprime numbers . φ(n) ...

  6. kuangbin project The basis of number theory part1?

    It's too difficult to focus on line trees , Let me do the math ! But math is too hard , I ......( pull I've thought about it for two days, checked it, sorted out some math . Except for some advanced knowledge , Like Mobius , Dujiao sieve ,min25 I can't learn to dance , Some basic thinking can still be recorded ...

  7. The basic part of number theory in cryptography is summarized Finite field GF(p) Galois Fields

    I spent the whole afternoon studying the number theory part of cryptography , Here's a summary of what you've learned , It's a memory enhancement . I'm interested in cryptography , And there are many mathematical formulas in this section , Use what you just learned LaTex Formula to present , Practice, practice , What ...

  8. [kuangbin Take you fly ] Topic 14 The basis of number theory

            ID Origin Title   111 / 423 Problem A LightOJ 1370 Bi-shoe and Phi-shoe   21 / 74 Problem B ...

  9. UVA10090 The basis of number theory exgcd

    Topic link :https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem ...

Random recommendation

  1. How mobile devices turn on RMS Encrypted documents

    keyword :RMS. AZure RMS.IPhone.Android.Office365.Sharepoint.Exchange Recently, I have been asked to read on apple and Android phones RMS The need to encrypt documents , After looking up the pictures ...

  2. gnuplot conditional plotting: plot col A:col B if col C == x

    http://stackoverflow.com/questions/6564561/gnuplot-conditional-plotting-plot-col-acol-b-if-col-c-x H ...

  3. dom4j establish xml

    In the front SAX,PULL And so on, since we can analyze , Of course, it can also generate . But here's dom4j establish xml file , Simple and easy to understand . dom4j It's independent api, Official website :http://www.dom4j.org/     You can download it here ...

  4. PL/SQL And -- Variable

    One .PL/SQL brief introduction PL/SQL It's also a programming language , It's called process SQL Language (Procedural Language/SQL).PL/SQL yes oracle Yes sql An extension of the statement , In general SQL In the use of statements ...

  5. So easy Webservice 2.WebService Introduce

    WebService The concept is introduced : Web Service It's a new technology ,  It can make different applications run on different machines without the aid of additional . Specialized third-party software or hardware ,  You can exchange data or integrate with each other . basis Web Service Normative reality ...

  6. django structure blog-- Set up the database part +admin part (eclipse+pydev)

    This article is about eclipse+pydev Under the platform , utilize django build blog Of the 1 part : Building a database +admin part Step one : establish myweb project +blog application 1. Eclipse So let's make a new one djan ...

  7. java Keep a few decimal places in

    public class NumUtils { /** * Keep two decimal places * * @param d * @return */ public static String get2Wei(double d ...

  8. C In language %d,%p,%u,%lu What's the use of waiting

    %d A signed 10 Hexadecimal integer (%ld Long integer ,%hd Short )%hu No sign short shaping (%u Unsigned shaping ,%lu Unsigned long shaping )%i A signed 10 Hexadecimal integer (%i and %d There is no difference between ,%i It's old-fashioned , They're all integer formats ) ...

  9. AspNetCore Use in InentityServer4(2)

    Based on the last article Realize to IdnetityServer4 Use of services 1: Add interface solutions , And make the interface protected by authentication service : First add... To the solution Api The project is shown in the following figure : stay API Add to the project Nuget quote Such as ...

  10. kali linux 2019.1 Replace burpsuite pro 1.7.37

    The following is all practical operation : Switch first JDK Version is 1.8. perform update-alternatives --config java Then multiple jdk edition ,1.8 choose 3 Input java –version Will be displayed jdk by 1 ...