Universal Cup Judging System

Universal Cup

시간 제한: 2.0 s 메모리 제한: 1024 MB 총점: 100 해킹 가능 ✓
통계

Du får ett heltal $N$ representerat i det decimala talsystemet.

Betrakta alla heltal som kan bildas genom att ordna om siffrorna i $N$ så att det resulterande talet inte har några inledande nollor.

Hitta antalet sådana heltal som är delbara med $11$, modulo $2147483647$ ($= 2^{31} - 1$), vilket är ett primtal.

Observera att heltalen som bildas genom att ordna om siffrorna i $N$ inkluderar $N$ självt.

Indata

Indatan ges i följande format:

$$N$$

  • Alla indatavärden är heltal.
  • $1 \le N < 10^{2 \times 10^6}$
  • $N$ ges i decimalform utan inledande nollor.

Utdata

Skriv ut svaret på en enda rad.

Exempel

Indata 1

1001

Utdata 1

2

Indata 2

31415926535

Utdata 2

144000

Förklaring

I det första exemplet uppfyller $1100$ och $1001$ villkoret.

Editorials

IDTypeStatusTitlePosted ByLast UpdatedActions
#1408EditorialOpen题解jianglyView

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.