PROBLEMAS RESUELTOS - ICPC Bolivia
PROBLEMAS RESUELTOS - ICPC Bolivia
PROBLEMAS RESUELTOS - ICPC Bolivia
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>PROBLEMAS</strong> <strong>RESUELTOS</strong><br />
Mary++;<br />
}<br />
printf( "Mary won %d times and John<br />
won %d times\n", Mary, John );<br />
}<br />
return 0;<br />
}<br />
/* Problem : Cara o Cruz<br />
* Language : JAVA (version: 1.5 )<br />
* By : Alberto Suxo<br />
**************************/<br />
import java.util.Scanner;<br />
public class F{<br />
public static void main(String args[]){<br />
int N, coin, John, Mary;<br />
int i;<br />
Scanner in = new Scanner( System.in );<br />
while( true ){<br />
N = in.nextInt();<br />
if( N==0 )<br />
break;<br />
John = Mary = 0;<br />
for( i=0; i