PTT推薦

Re: [請益] 公教優惠儲蓄的問題

看板PublicServan標題Re: [請益] 公教優惠儲蓄的問題作者
fatalfeel2
(風在動)
時間推噓 5 推:5 噓:0 →:2

(本文公式有更正在底部)

公教 定期儲蓄存款 半年給息 利率1.595%

附件為細算公式 至少問了六位行員

如果不說 你一定不知道Trick在那裡

那一家的我不想說了

最後得知 它是單利 同時 以int(integer整數去除小數點) 來算

你可以心算出第一年前兩個月是 0

無言...........................

公教人員 你們辛苦了

台北富邦數位客服:
定存利息的計算方法,採按日計息
一、算式:本金X年利率/365天*存款天數,
故每月給息者,金額可能因月份天數不同有些微差異


注意它是 [按日計息]

由於沒有註明是四捨五入 所以我一概去除小數點


10000*1.595%/365*1 = 0.43698630137 第1天 利息是 0
10000*1.595%/365*1 = 0.43698630137 第2天 利息是 0

第一個月 利息 0


////////////////////////////細算公式///////////////
Result0: 858 第一年利
Result1: 2801 第二年利
Result2: 4760 第三年利

將code start 到 code end 放入此站 然後點網站中第一列的Run看結果
https://www.onlinegdb.com/online_c++_compiler
如圖
https://www.mediafire.com/view/yvgqp550i4017zx/bank_interest.png/file

//code start
#include <iostream>
#include <stdio.h>

int main()
{
double half_interest0;
double half_interest1;
double accumulation = 0.0;

accumulation += ((int)(10000 * 1.595 / 100 / 365)) * 31;
accumulation += ((int)(20000 * 1.595 / 100 / 365)) * 28;
accumulation += ((int)(30000 * 1.595 / 100 / 365)) * 31;
accumulation += ((int)(40000 * 1.595 / 100 / 365)) * 30;
accumulation += ((int)(50000 * 1.595 / 100 / 365)) * 31;
accumulation += ((int)(60000 * 1.595 / 100 / 365)) * 20;
half_interest0 = accumulation;
accumulation = 0.0;
accumulation += ((int)((60000 + half_interest0) * 1.595 / 100 / 365)) * 10;
//6/21 pay interest
accumulation += ((int)((70000 + half_interest0) * 1.595 / 100 / 365)) * 31;
accumulation += ((int)((80000 + half_interest0) * 1.595 / 100 / 365)) * 31;
accumulation += ((int)((90000 + half_interest0) * 1.595 / 100 / 365)) * 30;
accumulation += ((int)((100000 + half_interest0) * 1.595 / 100 / 365)) * 31;
accumulation += ((int)((110000 + half_interest0) * 1.595 / 100 / 365)) * 30;
accumulation += ((int)((120000 + half_interest0) * 1.595 / 100 / 365)) * 20;
half_interest1 = accumulation;
accumulation = 0.0;
accumulation += ((int)((120000 + half_interest0 + half_interest1) * 1.595 /
100 / 365)) * 11; //12/21 pay interest
std::cout << "Result0: " << half_interest0 + half_interest1 + accumulation <<std::endl;

accumulation = 0.0;
accumulation += ((int)((120000 + 858 + 10000) * 1.595 / 100 / 365)) * 31;
accumulation += ((int)((120000 + 858 + 20000) * 1.595 / 100 / 365)) * 28;
accumulation += ((int)((120000 + 858 + 30000) * 1.595 / 100 / 365)) * 31;
accumulation += ((int)((120000 + 858 + 40000) * 1.595 / 100 / 365)) * 30;
accumulation += ((int)((120000 + 858 + 50000) * 1.595 / 100 / 365)) * 31;
accumulation += ((int)((120000 + 858 + 60000) * 1.595 / 100 / 365)) * 20;
half_interest0 = accumulation;
accumulation = 0.0;
accumulation += ((int)((120000 + 858 + 60000 + half_interest0) * 1.595 / 100
/ 365)) * 10; //6/21 pay interest
accumulation += ((int)((120000 + 858 + 70000 + half_interest0) * 1.595 / 100
/ 365)) * 31;
accumulation += ((int)((120000 + 858 + 80000 + half_interest0) * 1.595 / 100
/ 365)) * 31;
accumulation += ((int)((120000 + 858 + 90000 + half_interest0) * 1.595 / 100
/ 365)) * 30;
accumulation += ((int)((120000 + 858 + 100000 + half_interest0) * 1.595 / 100/ 365)) * 31;
accumulation += ((int)((120000 + 858 + 110000 + half_interest0) * 1.595 / 100/ 365)) * 30;
accumulation += ((int)((120000 + 858 + 120000 + half_interest0) * 1.595 / 100/ 365)) * 20;
half_interest1 = accumulation;
accumulation = 0.0;
accumulation += ((int)((120000 + 858 + 120000 + half_interest0 +
half_interest1) * 1.595 / 100 / 365)) * 11; //12/21 pay interes
std::cout << "Result1: " << half_interest0 + half_interest1 + accumulation <<std::endl;

accumulation = 0.0;
accumulation += ((int)((240000 + 2801 + 10000) * 1.595 / 100 / 365)) * 31;
accumulation += ((int)((240000 + 2801 + 20000) * 1.595 / 100 / 365)) * 28;
accumulation += ((int)((240000 + 2801 + 30000) * 1.595 / 100 / 365)) * 31;
accumulation += ((int)((240000 + 2801 + 40000) * 1.595 / 100 / 365)) * 30;
accumulation += ((int)((240000 + 2801 + 50000) * 1.595 / 100 / 365)) * 31;
accumulation += ((int)((240000 + 2801 + 60000) * 1.595 / 100 / 365)) * 20;
half_interest0 = accumulation;
accumulation = 0.0;
accumulation += ((int)((240000 + 2801 + 60000 + half_interest0) * 1.595 / 100/ 365)) * 10; //6/21 pay interest
accumulation += ((int)((240000 + 2801 + 70000 + half_interest0) * 1.595 / 100/ 365)) * 31;
accumulation += ((int)((240000 + 2801 + 80000 + half_interest0) * 1.595 / 100/ 365)) * 31;
accumulation += ((int)((240000 + 2801 + 90000 + half_interest0) * 1.595 / 100/ 365)) * 30;
accumulation += ((int)((240000 + 2801 + 100000 + half_interest0) * 1.595 /
100 / 365)) * 31;
accumulation += ((int)((240000 + 2801 + 110000 + half_interest0) * 1.595 /
100 / 365)) * 30;
accumulation += ((int)((240000 + 2801 + 120000 + half_interest0) * 1.595 /
100 / 365)) * 20;
half_interest1 = accumulation;
accumulation = 0.0;
accumulation += ((int)((240000 + 2801 + 120000 + half_interest0 +
half_interest1) * 1.595 / 100 / 365)) * 11; //12/21 pay interest
std::cout << "Result2: " << half_interest0 + half_interest1 + accumulation <<std::endl << std::endl;
return 0;
}
//code end

--

※ PTT留言評論
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 218.187.86.86 (臺灣)
PTT 網址

aleventy10/23 22:58超級優惠,給讚

maiico10/24 07:18央行14%屌打

y93298710/24 07:42搞不好是貪污 國外也有貪一元的案件 然後加總數字可觀

https://tinyurl.com/bd98wnwp

您說的叫 薩拉米 技術 Thomas Whiteside 在 1978 年出版的《Computer Capers》一書中報告了 40 多年前這種 技術的真實例子 銀行做就叫合法 你做就是違法

iverson41410/24 08:04笑爛了

longlydreami10/24 09:18其他投資比這個划算 這個太保守

RX78NT110/24 12:21我也有去櫃檯問,他回答反正公家不會算錯你就領就對了

※ 編輯: fatalfeel2 (114.32.93.159 臺灣), 10/25/2023 11:00:58

公式有修正請看這

https://www.ptt.cc/PublicServan/E.KrABC0mriKMw

※ 編輯: fatalfeel2 (114.32.93.159 臺灣), 10/25/2023 16:15:28

roy147yo10/25 18:35C++好難啊