Program BTT;
Uses crt;
Var tt,kWh,ndt: extended;
Begin
Clrscr;
Write('Nhap so kWh da dung: '); Readln(kWh);
Write('Ban thuoc nhom doi tuong 1 hay 2: '); Readln(ndt);
If ndt=1 then
Begin
If (kWh<0) and (kWh<=50) then tt:=1678*kWh;
If (kWh>50) and (kWh<=100) then tt:=1678*50+1734*(kWh-50);
If (kWh>100) and (kWh<=200) then tt:=1678*50+1734*50+2014*(kWh-100);
If (kWh>200) and (kWh<=300) then tt:=1678*50+1734*50+2014*100+(kWh-200)*2536;
If (kWh>300) and (kWh<=400) then tt:=1678*50+1734*50+2014*100+2536*100+(kWh-300)*2834;
If (kWh>400) then tt:=1678*50+1734*50+2014*100+2536*100+2834*100+(kWh-400)*2927;
End;
If ndt=2 then tt:=kWh*2461;
Write('Tong tien phai tra la: ',tt:0:2);
Readln
End.