Shokri is at a number store and wants to buy his love, Shakira a present for valentine's day (of course a number).
He knows that Shakira, only loves a number if and only if it's a multiply of holy number 31 .
The salesman recommended him a number n, and unfortunately Shokri is unable to check if Shakira loves it.
Your tasks is to accept the number n, if and only if Shakira will love it, using language Autolan.
Your program's order mustn't exceed 107 .
Input is a number n, 1 ≤ n ≤ 101000 .
Your program should accept the number n, if and only if Shakira will love it, using language Autolan.
31
Accepted
31294034
Rejected
31294035
Accepted
Peyman wants to take his love, Kimia to a modern restaurant, MaInHameRahUmadim on Valentine's day. The are n tables there. Each table has some subtables. Their graph forms a rooted forest (each component forms a rooted tree). Kimia just wondered, what's the number of connected components in this graph ? Peyman is lazy and also he wants everything to be perfect. So he asked you to answer him.
As you know, we can show a rooted forest with a proper sequence of [ and ]. Here, each vertex has an interval (a [ and its match) and a vertex is an ancestor of another vertex, if the other vertex's interval is inside it's interval.
You are given this forest as a string with [ and ] . You should write a program using Prolan language that it's input is the forest, and it's output is the number of components (an integers), without leading zero .
Your program's order mustn't exceed 107 .
A proper sequence of [ and ], s .
1 ≤ |s| ≤ 1000
An integer.
[][[[]][][][][[]]][]
3
[[]][][[[[[]]]]][[][][]][[][][]]
5
[]
1
Pashmak and Parmida are getting married this valentine. Pashmak has invited a guests to the wedding and Parmida has invited b guests. Unfortunately, they are making out and have no time to calculate the number of guests.
Your task is to calculate the number of guests (a + b) with language Cursle.
Your program's order mustn't exceed 107 .
A single string, Ba + bE (B and E are just B and E characters) .
1 ≤ a, b ≤ 101000 (Of course Pashmak and Parmida don't come from earth)
A single integers, c where c = a + b (without characters B and E) .
B10+3E
13
B4+6E
10
Rasta has bought a cake for valentine's day. He knows that his love, Rosita loves number a and he, himself loves number b. So he want to cut the cake into c pieces where c is the greatest number that a and b are both multiplies of c .
Your task is to write a program with language DIT, and storages a b 0 0 calculates number c and put it in storage number 1 (the other storages don't matter).
Your program's order mustn't exceed 2 * 107 .
The numbers in the storages are a b 0 0 in order.
1 ≤ a, b ≤ 105
c should be in the first storage.
1 5 0 0
1
6 8 0 0
2
Saleh was hanging out hole Valentine's day with his love, Sahel. Today is February 15 and he has a mathematics exam and he doesn't know anything about prime decomposition. He is not an idiot and he can figure out how to decompose a number into primes, but right now he can't focus and the only thing he can do is singing in his head,
"I don't know you, but I need more time
Promise me you'll be mine
Birds are flying over Europe's skies
Tell me please why can't I?..."
He asked you to help him and given storages n 0 0 0 using IDXT language calculate the following number and put it in the first storage :
where
and p1 < p2 < ... < pk and for each i, pi is a prime number.
Your program's order mustn't exceed 107 .
Storages with values n 0 0 0 in order.
1 ≤ n ≤ 105
The first storage should contain the answer.
8 0 0 0
3
200 0 0 0
5
It's valentine's day and everyone wants to have a romantic night. Nima, our hero is also one of this people and want's to decorate his place to have a romantic night with his love, Ghazal .
So, he went to CANDLE store (a special store that only sells candles). The store has only n candles and there are some customers there (including Nima). A customer would be happy if he/she buys exactly m candles. The salesman wants to make as much as customers as possible happy.
You should calculate this number using language Prolan.
Your program's order mustn't exceed 107 .
n / m = ?
1 ≤ n, m ≤ 10100
A single integer, the answer.
100/5=?
20
13/3=?
4
4/5=?
0