The Singapore NRIC number is made up of 7 digits and a letter behind. This letter is calculated from the first 7 digits using the modulus eleven method, similar to the method used for calculating the check digit of the ISBN Code.

The steps involved to obtain the check digit is

  1. Multiply each digit in the NRIC number by its weight.
  2. Add together the above products.
  3. Divide the resulting sum by 11.
  4. Subtract the remainder from 11 to give the check digit.
  5. Check the check digit against the table to obtain the alphabet.

The following table shows the weight for the NRIC number in Singapore :

2

7

6

5

4

3

2

The following table is used to change the check digit into the corresponding alphabet.

Check Digit

1

2

3

4

5

6

7

8

9

10

11

Alphabet

A

B

C

D

E

F

G

H

I

Z

J

This system is used to prevent illegal workers from entering Singapore with a fake passport using a fake NRIC number.

A person has a NRIC number S1234567A

To find out if the NRIC number is valid, we need to use the method above.

2(weight)*1(NRIC number) + 7(weight)*2(NRIC number) + 6(weight)*3 + 5*4 + 4*5 + 3*6 + 2*7 = 106

106/11 = 9 r 7

11-7 = 4

Using the table above, if the check digit is 4, then the alphabet at the end of the NRIC number should be D. So, we can conclude that this NRIC number is invalid.

The Singapore NRIC Check Digit的更多相关文章

  1. 2292: Quality of Check Digits 中南多校 暴力枚举

    #include <cstdio> #include <algorithm> #include <cstring> #include <iostream> ...

  2. Oracle Global Finanicals Technical Reference(一个)

    Skip Headers Oracle Global Finanicals Oracle Global Financials Technical Reference Manual Release 11 ...

  3. Oracle Global Finanicals Technical Reference(一)

    Skip Headers Oracle Global Finanicals Oracle Global Financials Technical Reference Manual Release 11 ...

  4. Awesome Go精选的Go框架,库和软件的精选清单.A curated list of awesome Go frameworks, libraries and software

    Awesome Go      financial support to Awesome Go A curated list of awesome Go frameworks, libraries a ...

  5. 通用js函数集锦<来源于网络/自己> 【一】

    通用js函数集锦<来源于网络/自己>[一] 1.返回一个全地址2.cookie3.验证用户浏览器是否是微信浏览器4.验证用户浏览器是否是微博内置浏览器5.query string6.验证用 ...

  6. business knowledge

    Finance knowledge Trading---At the core of our business model is Trading, which involves the buying ...

  7. jQuery Validate 表单验证

    在做网页表单时时常需要在客户端对表单填写的数据进行验证一番才能提交,我们可以通过自己编写JavasScript代码来验证,但是有时数据量过多时就会有些难度了.基于jQuery的jquery.valid ...

  8. jquery.validate插件在booststarp中的运用

    现在在网络上已经可以找到很多基于bootstarp的表单认证,但是验证的都不全面的,下载后,我们还要理解作者的思路然后进行修改添加,这种修改方式往往适合学习,时间很多的时候.但是我们很多时候是没有时间 ...

  9. 身份证js验证

    <script type="text/javascript"> //--身份证号码验证-支持新的带x身份证 function isIdCardNo(num) { var ...

随机推荐

  1. ununtu 下安装 Nvidia 显卡驱动

    本人电脑硬件配置:CPU : AMD Athlon(tm) II X2 215 Processor × 2 显示卡 : GeForce 6150SE nForce 430/integrated/SSE ...

  2. virtualBox中的centOS虚拟机硬盘扩容

    1. 在virtualBox中给虚拟机添加虚拟硬盘 此时. 已经将yanwu_disk1.vdi 虚拟硬盘添加到了虚拟机中, 接下来就是进行硬盘的挂载 https://www.cnblogs.com/ ...

  3. 3.4-3.6 依据业务需求分析HBase的表设计

    一.依据[话单]查询需求分析HBase的表设计 1.分析 用户需要进行实时的查询,那么这些数据是放在HBase当中的,每个客户每天接打电话至少20个左右,而通信公司拥有很多用户,每天产生的数据都是上亿 ...

  4. javascript runat server

    <script runat="server"> protected void SubmitBtn_Click(object sender, EventArgs e) { ...

  5. Appium测试环境搭建实践

    一.环境准备 1. JDK环境配置   a)下载并安装JDK http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138 ...

  6. Lightoj 1147【DP】

    题意: 把n个人分成两部分,要你怎么分使得两部分尽可能相等: 思路: 如果我们把一部分人的重量达到离sum/2最近,那就一定行啊 其实就是一条棒,两种不同的棒去拼接成一条棒,然后最好就是离mid最近, ...

  7. HDU4255【BFS】

    题意: 给你一个矩阵,矩阵里是的数是这么安排的,然后给你两个数,让你求这两个数的最短距离,素数不能去: 思路: 预处理一下素数表,矩阵,然后找一下起点和终点的坐标,跑一下BFS就好了: #includ ...

  8. Inside Geometry Instancing(上)

    Inside Geometry Instancing(上) http://blog.csdn.net/soilwork/article/details/598335 翻译:claymanclayman ...

  9. 洛谷 P1712 [NOI2016]区间(线段树)

    传送门 考虑将所有的区间按长度排序 考虑怎么判断点被多少区间覆盖,这个可以离散化之后用一棵权值线段树来搞 然后维护两个指针$l,r$,当被覆盖次数最多的点的覆盖次数小于$m$时不断右移$r$,在覆盖次 ...

  10. [HNOI2010] 弹飞绵羊 bounce

    标签:分块.题解: 200000,而且标号从0开始,很符合分块的条件啊.看看怎么实现. 首先分成√n个区间,然后如果我们对于每一个位置i,求出一个Next[i]和step[i],分别表示跳到的后一个位 ...