codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
#include <stdio.h> main() {int a[101],b[101]; int i,p,count; for(i=1;i<=100;i++) {a[i]=i;b[i]=1;} i=1;count=100; while(count!=1) { p=0; while(b[i]==1) {p++; if(p==3) { b[i]=0; p=0; count--; } i++; if(i==101) i=1; } } for(i=1;i<=100;i++) if(b[i]==1) printf("%d",i); }
Private
[
?
]
Run code
Submit