Love丶FFC's Blog
有 N 个非零且各不相同的整数。请你编一个程序求出它们中有多少对相反数(a 和 -a 为一对相反数)。
第一行包含一个正整数 N。(1 ≤ N ≤ 500)。
第二行为 N 个用单个空格隔开的非零整数,每个数的绝对值不超过1000,保证这些整数各不相同。
只输出一个整数,即这 N 个数中包含多少对相反数。
5
1 2 3 -1 -2
样例输出
2
1.用枚举法逐一比对。
package CCF_CSP; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class _20140301_100point { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); List<Integer> num = new ArrayList<Integer>(); for(int i=0;i<N;i++) num.add(scanner.nextInt()); int opposite = 0; //相反数个数 for(int i=0;i<num.size();i++) //枚举 { for(int j=i+1;j<num.size();j++) { if(num.get(i)==num.get(j)*(-1)) //逐一比对 { opposite++; } } } System.out.println(opposite); } }
fruinly
cialis for daily use Endocrine data
FoorryNox
How to use Orenitram ER cialis for sale in usa epinephrine and epinephrine racemic both decrease sedation
Preliaf
But Song Ning didn propranolol and erectile dysfunction t dare to go to the back mountain, so he could only ask the elder sister A Sang first, but A Sang was direct, saying that this matter was waiting for Gu Min to come back levitra vardenafil generico
AlanLit
canada pharmacy online
Richardatone
canadianpharmacyworld com
ZakLit
zestoretic 20
ZakLit
zestril 20 mg price canadian pharmacy
DavisIgnip
atenolol 100 25 mg
DavisIgnip
prednisolone 5 mg tablet
AlanLit
buy lioresal online
Richardatone
baclofen 5 mg
ZakLit
where can i where to buy cafergot for migraines
AlanLit
ampicillin 250 mg tablet
Twnvba
order fenofibrate 200mg generic purchase fenofibrate online order fenofibrate without prescription
ZakLit
wellbutrin 120 mg
Davidevelf
cymbalta duloxetine
DarrylBox
buy generic phenergan
Elwoodexcix
dexamethasone buy uk
CurtisHed
dexamethasone tablet
JoeLit
tadalafil india online
SamuelEcors
pharmacy store
AshLit
zanaflex 40 mg
Davidevelf
buy tadalafil 20mg price canada
CurtisHed
reliable rx pharmacy
EyeLit
dexona price
SamuelEcors
glucophage 750
JoeLit
what’s the best online pharmacy
DarrylBox
zithromax 500mg australia
DavisIgnip
retin a price south africa
SueLit
cheap cialis for daily use
Richardatone
prednisolone cheapest
Michaelsmopy
atenolol 12.5 mg tablets
ZakLit
nolvadex online india
AlanLit
retin a cream 0.05
DarrylBox
phenergan cream where to buy
JackLit
200 mg atarax
JosephKip
prazosin 5 mg brand name
CurtisHed
levaquin levofloxacin
Davidevelf
drug levaquin
JackLit
tamoxifen singapore
Davidevelf
pharmacy online 365
IvyLit
cymbalta wellbutrin
Michaelsmopy
azithromycin 1000
Michaelsmopy
order levaquin online
DarrylBox
triamterene 75mg hctz 50mg tablets
Williamjotly
nolvadex for sale uk
JosephKip
dexona medicine price
Elwoodexcix
atarax without prescription
ZakLit
order atarax online
SueLit
azithromycin 500 mg tablet price in india
Richardatone
atarax 25 mg price
JosephKip
robaxin 75 mg
Michaelsmopy
discount prednisolone
ZakLit
atarax 40 mg
IvyLit
prazosin 2.2 mg
ZakLit
best canadian pharmacy
Elwoodexcix
canadianpharmacymeds com
JosephKip
prednisolone 20 mg
SamLit
web pharmacy
SueLit
prazosin 2 mg
DavisIgnip
lipitor 20
CurtisHed
atarax medicine price
AshLit
online pharmacy delivery usa
AshLit
buy modafinil online singapore
JackLit
baclofen 0.01
AlanLit
cost less pharmacy
CurtisHed
triamterene 37.25mg
AshLit
tizanidine 4mg capsules
DarrylBox
online pharmacy indonesia
Michaelsmopy
levaquin 500mg
SamuelEcors
canadapharmacy24h
EyeLit
ebaylevaquin
Davidevelf
where can i buy cialis
SueLit
pharmacy phenergan comparison
DavisIgnip
robaxin generic
Elwoodexcix
best online pharmacy no prescription
SamuelEcors
nolvadex uk sale
AshLit
1600 mg motrin
Elwoodexcix
tamoxifen rx coupon
Michaelsmopy
buy levaquin online
Michaelsmopy
generic baclofen tablet
Bbzwwp
buy ketotifen 1 mg online order generic ketotifen cost tofranil 75mg
EyeLit
buy metformin 850 mg uk
JoeLit
cheapest cialis prices
Elwoodexcix
phenergan tablets 10mg
Elwoodexcix
tretinoin 0.05 australia prescription
JosephKip
levaquin
SueLit
metformin 500 mg price in india
Michaelsmopy
suhagra 50 online purchase in india
Pmnwyk
cialis 40mg sale viagra on line buy viagra 100mg sale
SamuelEcors
prednisone 5mg price in india
JackLit
accutane cost in india
AshLit
synthroid 0.112 mg
IvyLit
lisinopril 20 25 mg
IvyLit
diflucan tablet australia
SamuelEcors
synthroid cost
Elwoodexcix
ordering prednisone
JosephKip
can i buy azithromycin online
SueLit
zestril 10 mg price
DarrylBox
zestril canada
DavisIgnip
voltaren 75
SueLit
suhagra 100mg tablet price in india
SueLit
retino 0.5 cream price
EyeLit
price of generic synthroid
Elwoodexcix
best price for flomax
ZakLit
generic celebrex 200mg
DavisIgnip
zithromax 500mg cost
JackLit
cost of prednisone prescription
EyeLit
cephalexin brand
SueLit
synthroid pills for sale
ZakLit
bactrim without a prescription
AshLit
phenergan vc
IvyLit
150 mg diflucan online
Williamjotly
over the counter amoxicillin 500mg
Michaelsmopy
azithromycin 4 tablets
Michaelsmopy
where to get diflucan otc
IvyLit
trimox drug
EyeLit
albuterol 0.083 brand name
SamLit
can you buy ventolin over the counter
DarrylBox
keflex
CurtisHed
cheap plavix 75 mg
Richardatone
synthroid 125 mcg tablet cost
EyeLit
suhagra 50 mg price in india
Botvyl
precose 25mg uk repaglinide online order buy griseofulvin 250mg generic
IvyLit
buy zithromax online usa
DarrylBox
where can i get keflex
SueLit
can you buy synthroid online
DavisIgnip
how much is prednisone 10mg
DavisIgnip
phenergan 6.25 mg
Okicwu
how to get minoxidil without a prescription non prescription ed drugs ed pills that work quickly
IvyLit
buy phenergan 25mg uk
DarrylBox
suhagra 25 mg
Richardatone
buy cheap celebrex
Michaelsmopy
diflucan over the counter pill
JosephKip
tizanidine 40 mg
ZakLit
deltasone over the counter uk
DavisIgnip
generic plavix cost
DavisIgnip
albuterol from canada
Davidevelf
how much is diflucan over the counter
SueLit
on line order lisinopril 20mg
JosephKip
propranolol 10mg
IvyLit
buy prednisone cheap
IvyLit
voltaren uk gel
SueLit
buy propecia online canada
IvyLit
price of phenergan
AlanLit
retino 0.5 cream price
JosephKip
plaquenil discount
MaryLit
reputable online pharmacy
CurtisHed
generic zithromax 250mg
Davidevelf
accutane 40 mg price
SamLit
how to get phenergan
Elwoodexcix
cost of generic zithromax
DarrylBox
suhagra tablet price