Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
la wea afortunada
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
//gcc 5.4.0 #include <stdio.h> #include <stdlib.h> #define MAX 100000 typedef struct posibleafortunado{ int n; char num[MAX]; }posibleafortunado; int main(void) { int j,cont1,cont2; posibleafortunado a; do{ scanf("%d",&a.n); if(a.n==0)break; for(j=0;j<a.n;j++){ a.num[j]='0'; } cont1=2; cont2=a.n; while(cont1<cont2){ for(j=0;j<a.n;j=j+cont1){ } a.num[j]='1'; cont2--; } cont1++; } printf("\n%d:",a.n); for(j=a.n-1;j>=0;j--){ if(a.num[j]=='0'){ printf("%d ",j+1); } } }while(a.n!=0); return 0; }
gcc
3 10 30 0
Show compiler warnings
[
+
] Compiler args
[
-
]
Show input
Compilation time: 0.13 sec, absolute running time: 0.1 sec, cpu time: 0.01 sec, memory peak: 3 Mb, absolute service time: 0,32 sec
edit mode
|
history
|
discussion
3:2 10:8 6 2 30:30 26 24 20 18 14 12 8 6 2