if (a==b) result is 1.
if(t==1 || a<b) result is not an integer;
if(a>b) {
check numberOfDigits is less than 100 using logarithm
else
not an integer less than 100 digits;
}
Search found 10 matches
- Fri Oct 23, 2015 10:25 am
- Forum: Volume 100 (10000-10099)
- Topic: 10083 - Division
- Replies: 12
- Views: 9105
- Thu Jul 31, 2014 9:10 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10114 - Loansome Car Buyer
- Replies: 38
- Views: 21186
Re: 10114 - Loansome Car Buyer
In the problem statement
For each loan, the output is the number of complete months before the borrower owes less than the car is worth. Note that English requires plurals (5 months) on all values other than one (1 month).
does that mean i have to print 0 months instead of 0 month when the answer ...
For each loan, the output is the number of complete months before the borrower owes less than the car is worth. Note that English requires plurals (5 months) on all values other than one (1 month).
does that mean i have to print 0 months instead of 0 month when the answer ...
- Tue May 06, 2014 6:46 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10391 - Compound Words
- Replies: 40
- Views: 24527
Re: 10391 - Compound Words
what is the output of the following input?
Code: Select all
a
ali
alien
en
lien
- Sun Jul 28, 2013 1:00 am
- Forum: Volume 105 (10500-10599)
- Topic: 10502 - Counting Rectangles
- Replies: 24
- Views: 16397
Re: 10502 - Counting Rectangles
I used the same technique as the 836 - Largest Submatrix.
My code took .119s.
My code took .119s.
- Mon Dec 10, 2012 10:36 am
- Forum: Volume 108 (10800-10899)
- Topic: 10801 - Lift Hopping
- Replies: 56
- Views: 37188
Re: 10801 - Lift Hopping
Try these case:
INPUT
OUTPUT
INPUT
Code: Select all
3 2
100 5 3
0 1 2
1 2
1 2
3 2
100 5 3
0 1 2
0 1
1 2
Code: Select all
163
68
- Sat Dec 01, 2012 1:13 pm
- Forum: Volume 11 (1100-1199)
- Topic: 1197 - The Suspects
- Replies: 8
- Views: 4921
Re: 1197 - The Suspects
Simple DFS problem.
Run DFS from node 0 to find out how many nodes are connected with node 0.
Aware of input : m can be 0.
Happy coding.
Run DFS from node 0 to find out how many nodes are connected with node 0.
Aware of input : m can be 0.
Happy coding.
- Thu Nov 22, 2012 1:49 pm
- Forum: Volume 111 (11100-11199)
- Topic: 11110 - Equidivisions
- Replies: 33
- Views: 24176
Re: 11110 - Equidivision
Interesting problem.
The tricky part is input parsing. Input should be taken as string.
And another important thing is
The tricky part is input parsing. Input should be taken as string.
And another important thing is
Try the problem.An equidivision of an n x n square array of cells is a partition of the n^2 cells in the array in exactly n sets, each one with n contiguous cells.

- Sat Nov 17, 2012 10:39 pm
- Forum: Volume 119 (11900-11999)
- Topic: 11945 - Financial Management
- Replies: 10
- Views: 6175
Re: 11945 - Financial Management
My Accepted code gives the following output.
Input
8
100.00
489.12
12454.12
1234.10
823.05
109.20
5.27
1542.25
839.18
83.99
1295.01
1.75
100000.00
489120.00
12454120.00
1234100.00
823050.00
109200.00
5270.00
1542250.00
839180.00
83990.00
1295010.00
1750.00
0.00
0.50
0.50
0.50
0.00
0 ...
Input
8
100.00
489.12
12454.12
1234.10
823.05
109.20
5.27
1542.25
839.18
83.99
1295.01
1.75
100000.00
489120.00
12454120.00
1234100.00
823050.00
109200.00
5270.00
1542250.00
839180.00
83990.00
1295010.00
1750.00
0.00
0.50
0.50
0.50
0.00
0 ...
- Fri Nov 16, 2012 3:47 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10307 - Killing Aliens in Borg Maze
- Replies: 54
- Views: 25408
Re: 10307 - Killing Aliens in Borg Maze
I gathered a couple of test cases and I would be grateful if someone with an accepted solution would post their output.
13
6 5
#####
#A#A##
# # A#
#S ##
#####
7 7
#####
#AAA###
# A#
# S ###
# #
#AAA###
#####
4 3
####
#SA#
####
8 3
########
#A S A #
########
8 3
########
#ASAAAA#
########
20 ...
13
6 5
#####
#A#A##
# # A#
#S ##
#####
7 7
#####
#AAA###
# A#
# S ###
# #
#AAA###
#####
4 3
####
#SA#
####
8 3
########
#A S A #
########
8 3
########
#ASAAAA#
########
20 ...
- Fri Sep 16, 2011 6:49 am
- Forum: Volume 122 (12200-12299)
- Topic: 12250 - Language Detection
- Replies: 6
- Views: 3647
Re: WA in Language Detection 12250
print "UNKNOWN" for other languages.