본문 바로가기

Solutions/Fanta's Solution

PKU 2551. Ones. AC

오버플로우를 방지하기 위해
(a * b) % c = ((a % c) * (b % c)) % c
(a + b) % c = ((a % c) + (b % c)) % c
를 사용했습니다.


'Solutions > Fanta's Solution' 카테고리의 다른 글

PKU 2245. Lotto. AC  (0) 2010.05.16
PKU 2390. Bank Interest. AC  (0) 2010.05.16
PKU 2551. Ones. TLE  (2) 2010.05.09
PKU 3372. Candy Distribution. AC  (1) 2010.02.14
PKU 3224. Go for Lab Cup! AC  (0) 2010.02.01