Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

Bytelandian gold coins

$
0
0

getting wrong answer.. my code is

include<stdio.h>

int main() { unsigned long n,p;

while((scanf("%lu",&n))!=EOF) { p=0; if(n<12) printf("%lu",n); else { p=(n>>1)+(n/3)+(n>>2); if(p>n) printf("%lu",p); else printf("%lu",n); } } return 0; }


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>