#include <iostream> using namespace std; int main(){ long int j,k,count; while(scanf("%ld",&k)!=EOF){ // count = 0; // for(j = 1;count!=k;j++){ // if(j%3==2 && j%5==3 && j%7==2) // count ++; // } // printf("%d\n",j-1); printf("%ld\n",23+3*5*7*(k-1)); } return 0; } |
Double click to view unformatted code.