Logo
(追記) (追記ここまで)

7668번 - Divisibility 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB66544881.356%

문제

On the planet Zoop, numbers are represented in base 62, using the digits

0, 1, . . . , 9, A, B, . . . , Z, a, b, . . . , z

where

  • A (base 62) = 10 (base 10)
  • B (base 62) = 11 (base 10)
  • . . .
  • z (base 62) = 61 (base 10).

Given the digit representation of a number x in base 62, your goal is to determine if x is divisible by 61.

입력

The input test file will contain multiple cases. Each test case will be given by a single string containing only the digits ‘0’ through ‘9’, the uppercase letters ‘A’ through ‘Z’, and the lowercase letters ’a’ through ’z’. All strings will have a length of between 1 and 10000 characters, inclusive. The end-of-input is denoted by a single line containing the word “end”, which should not be processed.

출력

For each test case, print “yes” if the number is divisible by 61, and “no” otherwise.

제한

예제 입력 1

1v3
2P6
IsThisDivisible
end

예제 출력 1

yes
no
no

힌트

In the first example, 1v3 = 1 × 622 + 57 × 62 + 3 = 7381, which is divisible by 61.

In the second example, 2P6 = 2 × 622 + 25 × 62 + 6 = 9244, which is not divisible by 61.

출처

University > Stanford Local ACM Programming Contest > SLPC 2007 1번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /