vj1181 CoVH之密码破解

Vj1181 CoVH之密码破解

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
var n:longint; procedure main; var t,p,q:longint; st:string; begin readln(n); t:=1; p:=1; while n>t*9 do begin dec(n,t*9*p); t:=t*10;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: inc(p); end; q:=t+n div p+ord(n mod p<>0)-1; str(q,st); writeln(st[(n-1) mod p +1]); end; begin main; end....
View Full Document

This note was uploaded on 02/21/2011 for the course CS 001 taught by Professor 001 during the Spring '11 term at Shandong University.

Ask a homework question - tutors are online