vj1230 &aelig;•&deg;&ccedil;š„&aelig;œ—&egrave;&macr;&raquo;

Vj1230 æ•°çš„æœ—è¯»

This preview shows pages 1–2. Sign up to view the full content.

//±ÉÈËµÄ·½·¨ //·ÖÖÎ //4Î»Ò»×é´¦Àí ×î¶à3×é //Ã¿×éÓÐÒ»¸öµ¥Î» ×éÖÐ·Ö±ðÓÐ4¸öµ¥Î» / const d1:array[0. .3] of string[1]=('Q','','S','B'); //×éÖÐµÄµ¥Î» d2:array[1. .3] of string[1]=('','W','Y'); //Ã¿×éµÄµ¥Î» var s,ans:string; f:boolean; procedure init; begin readln(s); end; procedure main; var i,j,k,l,len,p:integer; begin (*´¦ÀíÐ¡Êý²¿·Ö*) p:=pos('.',s); if (p>0) and (p<length(s)) then ans:='D'+copy(s,p+1,length(s)-p); delete(s,p,length(s)-p+1); (*´¦ÀíÇ°µ¼ ¡®+¡¯ ¡®-¡¯ ¡®0¡¯*) if s[1]='-' then begin f:=true; delete(s,1,1); end; if s[1]='+' then delete(s,1,1); while (length(s)>1) and (s[1]='0') do delete(s,1,1); if s[1]='0' then begin ans:='0'+ans; exit; end; (*·ÖÖÎ 4Î»Ò»×é*) len:=length(s); l:=len div 4+ord(len and 3<>0); //·ÖÖÎ³¤¶È for i:=1 to l do

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the 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.

Page1 / 2

Vj1230 æ•°çš„æœ—è¯»

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online