#40026: C++單行解


badonkadooonkmc@gmail.com (BlueW)

學校 : 國立成功大學
編號 : 269763
來源 : [140.116.130.208]
最後登入時間 :
2024-07-04 18:01:23
c638. 天干地支 -- it's david | From: [106.105.44.160] | 發表日期 : 2024-04-22 18:15

int n; while (cin >> n) cout << vector<string>{"甲","乙","丙","丁","戊","己","庚","辛","壬","癸"}[(n+6)%10] << vector<string>{"子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"}[(n+8)%12] << endl;

 
ZeroJudge Forum