Skip to content

Commit b56be44

Browse files
authored
Create Lecture - 27.cpp
1 parent 30d769b commit b56be44

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Lecture - 27.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//
2+
// main.cpp
3+
// lecture 27
4+
//
5+
// Created by Prince Kumar on 31/03/19.
6+
// Copyright © 2019 Prince Kumar. All rights reserved.
7+
// code of codechef problem - Two vs Ten
8+
9+
#include <iostream>
10+
using namespace std;
11+
int main()
12+
{
13+
int T; cin>>T;
14+
while(T--)
15+
{
16+
int x; cin>>x;
17+
if(x%10==0)
18+
cout<<"0"<<endl;
19+
else if(x%5==0)
20+
cout<<"1"<<endl; // 5*2 =10
21+
else
22+
cout<<"-1"<<endl;
23+
}
24+
}

0 commit comments

Comments
 (0)