1 solutions
-
0
C :
#include<stdio.h> void main() { int i=1; while(i<=500){ if (i%3==2&&i%5==3&&i%7==2){ printf("%d\n",i); } i++; } }
C++ :
#include <iostream> #include <iomanip> using namespace std; int main(){ int i; for(i=1;i<=500;i++){ if(i%3==2&&i%5==3&&i%7==2){ cout<<i<<endl; } } }
Python :
for i in range(1,500): if i % 3 == 2 and i % 5 == 3 and i % 7 == 2: print(i)
- 1
Information
- ID
- 10852
- Time
- 1000ms
- Memory
- 16MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By