朱色虫居
Pages
Home
Featured Posts
2006/10/05
10696-Problem A - f91
/*
"Problem A - f91"
Level:1.0
Date:2006/10/4
技巧:本來應該寫成recursion的,但當input不大於100時,f91的output都是91.
所以投機取巧下,這題就變白爛題.
*/
#include
main(){
long int n=0;
while(scanf("%ld",&n)==1){
if(n==0)
break;
if(n<=100) printf("f91(%ld) = 91\n",n); else printf("f91(%ld) = %ld\n",n,n-10); } }
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment