-
Notifications
You must be signed in to change notification settings - Fork 0
/
10101.cpp
54 lines (47 loc) · 949 Bytes
/
10101.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include <cstdio>
#include <cmath>
#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
#include <vector>
#include <utility>
#include <stack>
#include <queue>
#include <map>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define pi 2*acos(0.0)
#define eps 1e-9
#define PII pair<int,int>
#define PDD pair<double,double>
#define LL long long
#define INF 1000000000
using namespace std;
int coin[]={10000000,100000,1000,100};
string nama[]={"kuti","lakh","hajar","shata"};
int T,x;
LL num;
void konversi(LL now)
{
for(int x=0;x<4;x++) if(now/(LL)coin[x])
{
konversi(now/(LL)coin[x]);
printf(" %s",nama[x].c_str());
now%=(LL)coin[x];
}
if(now) printf(" %lld",now);
}
int main()
{
T = 0;
while(scanf("%lld",&num)!=EOF)
{
printf("%4d.",++T);
if(num==0LL) printf(" 0"); else konversi(num);
printf("\n");
}
return 0;
}