Love丶FFC's Blog
给定n个不同的整数,问这些数中有多少对整数,它们的值正好相差1。
输入的第一行包含一个整数n,表示给定整数的个数。
第二行包含所给定的n个整数。
输出一个整数,表示值正好相差1的数对的个数。
6
10 2 6 3 7 8
3
值正好相差1的数对包括(2, 3), (6, 7), (7, 8)。
1<=n<=1000,给定的整数为不超过10000的非负整数。
1.使用枚举法逐一比对。
2.使用Java中的Math.abs方法。
package CCF_CSP; import java.util.Scanner; public class _20140901_100point { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int[] num = new int[n]; for(int i=0;i<n;i++) num[i]=scanner.nextInt(); int neighbor = 0; //相邻数对的个数 for(int i=0;i<n;i++) //枚举法 for(int j=i+1;j<n;j++) { if(Math.abs(num[i]-num[j])==1) //绝对值为1 { neighbor++; } } System.out.println(neighbor); } }
fruinly
vomiting 4 diarrhea 4 changes in appetite 3 lethargy 1 where to buy viagra connect Angel rTnEfxFPSsIYiDEFWP 6 18 2022
FoorryNox
buying cialis online Overall, our data suggest that manipulations in the mTOR pathway may have potential therapeutic benefit
Preliaf
In an accompanying commentary reported in Pediatrics, Cody Meissner Tufts University, USA notes that development of antiviral vaccines began when Peyton Rous postulated in the early 1900s that sarcoma transmission between hens may be virus related, followed by identification in 1964 of the first human DNA tumour virus, the Epstein Barr virus natural viagra for women
DavisIgnip
budesonide 9 mg tablets
DarrylBox
amoxicillin cost
Elwoodexcix
tamoxifen prescription
ZakLit
northwest pharmacy canada
SamLit
budesonide 0.6 mg
IvyLit
lyrica from mexico
MaryLit
lyrica 70 mg
ZakLit
buy paxil online canada
Williamjotly
buy azithromycin australia
DarrylBox
generic atenolol price
Elwoodexcix
500g amoxicillin
DavisIgnip
acticin 5
ZakLit
cheap synthroid online
IvyLit
effexor xr cost
SamLit
buy nolvadex uk online
MaryLit
cymbalta 90 mg capsule
SamLit
dapoxetine purchase uk
MaryLit
erectafil 40 mg
Wopqms
buy generic fenofibrate over the counter where to buy tricor without a prescription tricor 160mg cheap
Williamjotly
tretinoin 0.1 australia
ZakLit
plaquenil brand name
Elwoodexcix
lyrica best price
DarrylBox
baclofen uk online
Williamjotly
online otc pharmacy
Richardatone
cymbalta australia
Davidevelf
robaxin south africa
IvyLit
atarax 25 mg buy
JosephKip
azithromycin pills 250 mg
SueLit
4004 atarax
SamLit
atarax medicine
ZakLit
cialis online without prescription
ZakLit
lipitor canada pharmacy
DarrylBox
dexamethasone cream over the counter
SamuelEcors
how much is phenergan
SueLit
generic for phenergan
JosephKip
medicine atenolol 50 mg
SamuelEcors
buy lipitor from india
DavisIgnip
online pharmacy no rx
EyeLit
atarax for sleep
AshLit
buy effexor online canada
SueLit
retin a cream without a prescription
Williamjotly
canadian pharmacy in canada
SamuelEcors
prices pharmacy
DavisIgnip
atarax 25 mg price
AlanLit
atenolol 25 mg coupon
IvyLit
canadian pharmacy online store
Michaelsmopy
safe canadian pharmacy
IvyLit
atenolol 25 mg tablet
SueLit
buy online zithromax
JosephKip
prazosin 1 mg capsule
CurtisHed
generic cymbalta best price
Michaelsmopy
cheapest pharmacy to get prescriptions filled
SueLit
best price for cymbalta
JosephKip
triamterene 50 mg
Davidevelf
cymbalta for sale
SamuelEcors
buy robaxin no prescription
Davidevelf
my canadian pharmacy rx
MaryLit
triamterene-hctz 75-50mg tab
DavisIgnip
lipitor generics
ZakLit
reputable indian online pharmacy
DarrylBox
online pharmacy no presc uk
AlanLit
phenergan 25 mg over the counter
SamLit
india pharmacy mail order
JackLit
phenergan promethazine
IvyLit
cialis viagra
Elwoodexcix
how can i get metformin
Richardatone
generic metformin 10 mg tablet
DarrylBox
buy cymbalta
JosephKip
online pharmacy indonesia
Michaelsmopy
generic retin a 05
AshLit
trazodone 60 mg
CurtisHed
cymbalta over the counter
IvyLit
atenolol canadian pharmacy
SamLit
prednisolone tablets buy online
Michaelsmopy
robaxin 750mg
Williamjotly
atarax 5mg
Elwoodexcix
cheap prednisolne
DarrylBox
prednisolone best price
Elwoodexcix
metformin over the counter usa
Williamjotly
how much is retin a in canada
DavisIgnip
cialis online without prescription
EyeLit
triamterene weight loss
EyeLit
lisinopril 12.5 mg 10 mg
DavisIgnip
can you buy doxycycline over the counter australia
Williamjotly
synthroid 137 mcg price
SamuelEcors
retino 0.25
Zokrpg
ketotifen over the counter zaditor buy online tofranil uk
AshLit
diflucan online nz
Michaelsmopy
lyrica 50 mg cost
JosephKip
synthroid 250 mg
Elwoodexcix
order amoxicillin online without a prescription
AshLit
azithromycin 500 mg price india
Davidevelf
azithromycin cap 250 mg
SamLit
how to buy cephalexin without a prescription
Davidevelf
voltaren 100g gel
CurtisHed
plaquenil tablets 200mg
JosephKip
where to get amoxicillin online
SueLit
doxycycline 100mg cost australia
IvyLit
plavix 75 mg tablet
IvyLit
accutane online india
Cribxw
oral cialis 10mg sildenafil over the counter order sildenafil 50mg online cheap
SamuelEcors
doxycycline 5553
Michaelsmopy
synthroid prescription
Davidevelf
4 amoxicillin pills
SamLit
augmentin 375mg tablets
MaryLit
doxyhexal
SamuelEcors
zanaflex pill
Davidevelf
augmentin 500 mg
DavisIgnip
azithromycin medicine price
Elwoodexcix
buy suhagra 100mg online
MaryLit
lisinopril 12.5 20 g
MaryLit
propecia 1 mg for sale
SamLit
voltaren gel 30g
IvyLit
voltaren gel australia
Michaelsmopy
canadian pharmacies comparison
MaryLit
reputable online pharmacy no prescription
Richardatone
celebrex price usa
Michaelsmopy
cheap accutane
AshLit
keflex 500 mg prices
MaryLit
diflucan 150 capsule
Elwoodexcix
canadian pharmacy diflucan
SueLit
lisinopril 5 mg daily
ZakLit
retino a
Yngcna
precose 25mg pill buy fulvicin no prescription buy griseofulvin 250 mg sale
Elwoodexcix
celebrex 10mg
DarrylBox
retino 0.025
SamLit
prednisone acetate
JoeLit
plavix brand name
ZakLit
finasteride pills for sale
IvyLit
propranolol mexico
Davidevelf
prednixone tables for sale
SamuelEcors
hydroxychloroquine nz
Richardatone
average cost of flomax
Hwbabb
buy minoxidil online buy flomax 0.4mg online best ed medication
Elwoodexcix
voltaren 80 mg
EyeLit
ventolin prices in canada
Richardatone
phenergan over the counter uk
EyeLit
where to get accutane in south africa
AshLit
suhagra 50 mg online
JackLit
plaquenil 200mg tablet cost
IvyLit
buying doxycycline online in usa
CurtisHed
synthroid 88 mg price