You are on page 1of 10
time limit per test: 1 second memory limit per test: 256 megabytes input: standard input output: standard output Given a number N. Print numbers from 1 to N in separate lines. Input Only one line containing a number N (1 < N < 103) Output Print N lines according to the required above. Example input % output By abd-alaziez, contest: LOI23 Day 6 Practice, problem: (A) 1 to N, Accepted, #, Copy #include using namespace std; int main () {int i=1,n; cin >>n; while (i<=n) {cout< using namespace std; int main () {int n; cin >>n; if (n>=2){ for(int i=2;i<=n;i=i+2) {cout< #include using namespace std; int main () {int n,m=-1; cin >>n; for(int i=0;i>x; if(xm) m=max(m,X); } cout< using namespace std; int main() {long long n; cin>>n; for(int D=1; D<=n; D++) {if ((n%D)==0) cout< using namespace std; int main() {int n,j,c=0; cin>>n; for (int j=1; j<=n; j++) { if (n%j==0) { c++; }} if(c==2) { cout<<"YES" << endl; i) else { cout<<"NO"; } return 0; } ~ Judgement Protocol Test: #1, time: 0 ms., memory: 0 KB, exit code: 0, checker exit code: 0, verdict: OK Input 7 Output YES Checker Log ok single line: 'YES' Test: #2, time: 0 ms., memory: 0 KB, exit code: 0, checker exit code: 0, verdict: OK Input Ss Output NO Checker Log

You might also like