当前位置:网站首页>Sum of squares of two pointers
Sum of squares of two pointers
2022-06-30 14:37:00 【Douglas_ LT】
A daily topic ing, Today is a day medium topic 633. Sum of Square Numbers
class Solution {
public:
bool judgeSquareSum(int c) {
long long i=0,j=sqrt(c);
while(i<=j){
long long temp=i*i+j*j;
if(temp==c){
return true;
}
if(temp>c){
j--;
}
else{
i++;
}
}
return false;
}
};
边栏推荐
- Detailed explanation of settimeout() and setinterval()
- JS time conversion standard format, timestamp conversion standard format
- 【BUUCTF】[GXYCTF2019]Ping Ping Ping1
- After the MySQL service on the local computer is started and stopped, some services will automatically stop when they are not used by other services or programs
- Hbuilder most commonly used and full shortcut key set
- 1 figure to explain the difference and connection between nodejs and JS
- 數據恢複軟件EasyRecovery15下載
- Lfi-rce without controllable documents
- Use PHP to delete the specified text content in the file
- Go common lock mutex and rwmutex
猜你喜欢
Wuenda 2022 machine learning special course evaluation is coming!
Component communication mode
Error on datetime when importing SQL file from MySQL
【BUUCTF】[GXYCTF2019]Ping Ping Ping1
2021-05-12
Computer screenshot how to cut the mouse in
Att & CK red team evaluation field (I)
Pytoch viewing model parameter quantity and calculation quantity
[buuctf] [actf2020 freshman competition]include
Realize a simple LAN communication (similar to feiqiu)
随机推荐
Pit used by go language array type
DefCamp Capture the Flag (D-CTF) 2021-22 web
The first three passes of sqli Labs
Laravel RBAC laravel permission use
Comprehensively analyze the basic features and summary of free and paid SSH tools
Clear the route cache in Vue
Small exercise of process and signal
[extensive reading of papers] multimodal joint attribute prediction and value extraction for e-commerce product
Begin End use the pit encountered
Notes on reverse learning in the first week of winter vacation
Hbuilder most commonly used and full shortcut key set
DB2 SQL Error: SQLCODE=-206, SQLSTATE=42703
Component communication mode
Knowledge learned from the water resources institute project
PHP common authentication / third-party methods
Three uses of golang underscores
notepad正则删除关键词所在行
About the problems encountered when using the timer class to stop with a button (why does the QPushButton (for the first time) need to be clicked twice to respond?)
Geoffreyhinton: my 50 years of in-depth study and Research on mental skills
JMeter transaction controller