Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
输出导致wa,请帮忙看看哪里错了如果用printf("%x",ans)就可以ac,但是自己写的10进制到16进制的输出就错了…… :( char Dec2Hex(int t) { return t<10?'0'+t:'a'+(t-10); } void p(int n) { if (n/16) { p(n/16); } printf("%c",Dec2Hex(n%16)); } main() { ........ p(ans);printf("\n"); .... } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator