16 Şubat 2013 Cumartesi
Codeforces - Beatiful Year
Click and See Problem
#include "stdafx.h"
#include <iostream>
using namespace std;
void findout () {
int a,b=0,digon,digtw,digth,digfo;
bool c=false;
do {
cout << "Please Enter Bigger than 1000 and Smaller than 9000" << endl;
cin >> a;
}while(a<1000 || a > 9000);
do {
a++;
digon = a/1000;
digtw = (a - (digon* 1000)) / 100;
digth = (a % 100) / 10;
digfo = a %10;
if(digon == digtw || digon == digth || digon ==digfo || digtw == digth ||digtw == digfo || digth == digfo ) {
c = false;
}else {
c=true;
}
}while(c==false);
cout <<a << " efekanpulatli.blogspot.com" << endl;
}
int main() {
findout();
system("pause");
return 0;
}
Kaydol:
Kayıt Yorumları (Atom)

Hiç yorum yok:
Yorum Gönder