₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,346,364 members, 8,522,622 topics. Date: Saturday, 21 November 2026 at 04:18 PM

Toggle theme

Turmacs's Posts

Nairaland Forum › Turmacs's Profile › Turmacs's Posts

1 2 3 4 5 6 7 8 9 10 (of 24 pages)

Career › Re: Sexual Harassment: More Women Testify Against Ibrahim Lamuwa by turmacs(f): 8:49am On Jun 17, 2024
Rubbish
Celebrities › Re: Soft Opening Of Trend's Place Hotel To Hold With Sallah Feast At Airport Road by turmacs(f): 7:10am On Jun 17, 2024
s
Programming › Re: You Guys Will Love This Problem by turmacs(op):
If no solution till tommorow, then i'll drop the solution with explanations, goodnight.
Programming › Re: You Guys Will Love This Problem by turmacs(op): 11:46pm On Jun 16, 2024
tensazangetsu20:
Why did you out my name there. I will never solve it grin grin grin. Dey play. If money isn't involved I will never code tongue tongue tongue
grin
Programming › You Guys Will Love This Problem by turmacs(op): 11:44pm On Jun 16, 2024
Note This problem has to be solved in O(1) time. O(n) solutions or anything more than O(1) (constant time) will fail because n,a,b can be as large as 109. So if your solution is not O(1), it'll be too slow for large values of n.

Problem statement
tensazangetsu20 just launched his bread factory today and he baked n breads to sell. The usual price of a bread is a naira, but being his first day of business, tensazangetsu20 decided organize the following promotions:
*tensa chooses some integer k (0 ≤ k ≤ min(a ,b))
*tensa sells his first k breads at a modified price. In this case, the price of the i'th (1 ≤ i ≤ k) sold bread is (b - i + 1) naira.
*The remaining (n-k) breads are sold at the usual price of a naira each.
Note that k can be equal to 0 and in that case, tensa will sell all his breads at a naira each.
Your task is to help tensazangetsu20 find the maximum profit he can obtain by selling all n breads.

Input
The first line of the input contains a single integer t (1 ≤ t≤ 104) — the number of test cases.

The only line of each test case contains three integers n, a, and b (1≤ n,a,b ≤ 109) — the number of breads, the usual price of a bread, and the price of the first bread to be sold at a modified price.

Output
For each test case, output one integer, the max profit tensazangetsu20 can generate.

Example
input
7
4 4 5
5 5 9
10 10 5
5 5 11
1000000000 1000000000 1000000000
1000000000 1000000000 1
1000 1 1000

output
17
35
100
45
1000000000000000000
1000000000000000000
500500
Properties › Re: My Landlord Is Endangering The Health Of Everyone In The Compound. by turmacs(f): 7:25pm On Jun 16, 2024
How old are you first? undecided All these shameless men we have nowadays, some of them are not ashamed of saying that they still live as tenants at their age. Some of you are not ashamed of yourselves... Young boys of 23 years old that some of you know when they married their mothers are building houses, buying cars worth millions, owning multimillion naira businesses, have hundreds of millions sitting in their bank accounts, but some of you at your age are not ashamed to say that you still live in landlords house, i spit on your bald heads. The most annoying part is that instead of them to go and Hussle for money, na woman be their number one priority, stupid men everywhere. God please anything that will make me have anything to do with a broke man in rebuke it in the mighty name of jesus.
Sports › Re: Finidi George’s Achievements Vs Victor Osimhen Record by turmacs(f): 11:31pm On Jun 15, 2024
9JAMac10:
Finidi garnered the disrespect with his misbehaving. Don’t lay all the blame on Victor. Respect is reciprocal in civilized societies. I know naija different 😂
As in.. Na idiot's na him full this country i swear.. If na me be that guy, this we mark the end of my Nigerain football career.. I no fit dey represent such foolish people.. I go just go abroad where people get sense go raise my children and live my life.
Programming › Re: Let us see the real programmers. Not Every Time Here Frontend, Backend, React. by turmacs(op): 7:01pm On Jun 14, 2024
Paystack:
See your head like fun

You think people that spend their daily lives coding professional task and creating solutions each day are your mates?

Fooolish girl.

Fun kpai u there
Chai, I can feel the pain in your comment grin Pain kpai u there.
Programming › Re: Let us see the real programmers. Not Every Time Here Frontend, Backend, React. by turmacs(op): 6:56pm On Jun 14, 2024
Paystack:
You're as ugly and your solution.

You that kept telling people ChatGPT couldn't solve it

Meaning you couldn't even write a good prompt to solve it with AI
copy copy dev
I don't blame your father... When it comes to anything that has to do with programming, math, logical thinking or problem solving in general, please leave it for people like us because me and you no be mate for this thing normally. You can stick to what your brain can carry, frontend,back-end, react, etc.... I don't code for daily bread like most of you, I code for fun, passion and for my love of math. Have a nice life.
Programming › Re: Another Programming Problem For Those That Love DSA problems by turmacs(op): 1:53pm On Jun 14, 2024
Shomek:
You are just foolish naturally
You this ugly girl calling my father's name

never in your life don't try that again or else
{ you will see shege here on nl }
It is your mother that is an ugly girl
Programming › Re: Another Programming Problem For Those That Love DSA problems by turmacs(op): 1:32pm On Jun 14, 2024
Shomek:
I can't just understand you
What do take us for ?
Do you want us to be helping you to solve your problems for free or what ?
Who's "us" ? Because last time I checked, I never mentioned your fathers name anywhere on the thread... I just posted the problem for anyone that would love to challenge themselves or likes leetcode style problems. If you can't or don't want to solve it then you move, abi what's your problem? undecided
Crime › Re: 20-Year-Old Man Kidnaps Himself, Collects ₦5M Ransom In Bitcoin From His Father by turmacs(f):
Things like this mostly happens when you have stingy parents. Some parents prefer to impress outsiders with their money than to give their children.
Pets › Re: Rottweiler Catches A Thief And Refuses To Let Him Go (Video) by turmacs(f):
Shebi he knows that if the dog kills that man he's going to jail? undecided
Programming › Re: Another Programming Problem For Those That Love DSA problems by turmacs(op): 8:56am On Jun 14, 2024
smiley
Programming › Another Programming Problem For Those That Love DSA problems by turmacs(op):
Check this problem......

Problem statement
A sentien is a integer who's digits are all 1 in decimal representation. The sentiens in ascending are 1,11,111,........ and so on.
Your task is to find the N'th smallest integer that can be represented as the sum of exactly three sentiens.

Constraints
N is an integer between 1 and 333, inclusive

Input
The only line of the input contains N.

Output
Output the N'th smallest integer that can be represented as the sum of three sentiens.

Example
Input 1
5
Output 1
113

The integers that can be represented as the sum of exactly three sentiens are 3,13,23,33,113,.... in ascending order. For example, you can express 113 as 113 = 1 + 1 + 111, you can express 3 as 3 = 1+1+1, you can express 13 as 13 = 1 + 1 + 11.
Note that the three sentiens do not have to be different.

Input 2
19
Output 2
2333

Input 3
333
Output 3
112222222233
Programming › Re: Let us see the real programmers. Not Every Time Here Frontend, Backend, React. by turmacs(op): 7:37am On Jun 14, 2024
For those that might be interested in how to think about the solution....

First of all you need to understand that this problem is not as mathematical as some might have thought, because I assumed that after reading the second paragraph some people who are not math inclined will lose hope, it's just pure implementation problem with very very little math, basically just addition and subtraction. I don't know what that MindHacker9009 guy is saying, university mathematics students grin Lolzz.. A child in jss1who knows how to code should be able to solve this with little effort.

You have to observe that the points that are part of the circle are always in a diamond shape and are symmetrical from the middle column.
All you have to do is to find the first appearance of '#' character because the first appearance will always be the on the same column as the center of the circle ( the row and column that it's found on) and to find the row that the center appears on, just count the number of '#' in the middle column, divide that count by 2 (to find the position of the middle) then add whatever you get to the row number that the first '#' was on.

Sorry if my explanation is hard to understand by here is my C++ solution to the problem, you can use chatgpt to convert to any language of your choice to understand it.


#include <vector>
#include <iostream>
using namespace std;
void paveway(){
long long n , m; cin >> n >> m; long long ans = 0, cnt = 0;bool ant = false;
vector<vector<char>> a(n , vector<char>(m));long long anc = 0;
for(long long i = 0; i < n; i++){
for(long long j = 0; j < m; j++){
cin >> a[i][j];
if(a[i][j] == '#' && ant == false){
ans = j + 1 , anc = i + 1; ant = true; // This is where we find the row and column of the first ever '#'
}
if(a[i][j] == '#' && j == ans - 1) cnt += 1; // This keep's count of the number of '#' on the middle column
}
}
cout << cnt/2 + anc << " " << ans << endl;
}
int main (){
ios::sync_with_stdio(false);
cin.tie(nullptr);
//long long t = 1;
long long t; cin >> t;
for( ;t--; )
paveway();
return 0;
}
Programming › Re: Let us see the real programmers. Not Every Time Here Frontend, Backend, React. by turmacs(op):
MindHacker9009:
Software Engineers on NL will not waste their valuable time on such a tasks that lack commercial viability. Such tasks you posted are typically more suited for university mathematics students who are learning to apply programming to solve their mathematical exercises.

Here is an example of what Software Engineers on NL will spend their valuable time on:

Implement a piece of online software suitable for use by a cinema. The system should be
capable of providing information about films currently showing, and of the availability
of seats in the cinema. The system should allow for seats to be booked either
individually or as a block. For example a block of 3 seats would require 3 adjacent
seats to be booked together.
Bro please keep quiet, you always talk reason like what i don't know. You could not solve it be say you could not solve it, this is a leetcode style problem so you're telling me it's university students that should be doing leetcode? Okay when you get to your next interview and they give you leetcode style problem, tell them that one. You will not waste time to solve a simple problem that would not take more than 15 LOC to solve, but you have time to type all this gibberish? Ohh please grin I've always known you to shy away from anything that has to do with any form of critical thinking so I'm not surprised here. The other day i posted a simple math problem, na still this you gibbering you use as excuse.
Programming › Re: Let us see the real programmers. Not Every Time Here Frontend, Backend, React. by turmacs(op): 7:08am On Jun 14, 2024
Paystack:
Mad woman.

How much are you paying... you have gone to solve it with ChatGpt and it couldn't solve it for you after all your trials you yourself couldn't solve it.

I know you went to Google and get the answer somewhere then brought the question here to console yourself thinking everyone is dumb like you.

No one self should waste time trying to solve it for you as you just want to ridicule people and console yourself instead of learning.

Fork u!
Look at this one grin Such a pained soul, all these self taught people sef. Before I posted the problem, i know I'll find dumb devs who can not solve the simple problem but will use "how much" as an excuse to escape reality. You're dumb be say you're dumb, all these long talk no necessary.
Politics › Re: LG Autonomy: Supreme Court Reserves Judgment In FG Suit Against Governors by turmacs(f): 1:27pm On Jun 13, 2024
angry
Business › Re: Dangote To Establish Petrol Terminal In The Caribbean by turmacs(f):
Mr Dangote, i just want to let you know that anyone of you so called "elites" that might have been involved in any sort of corruption for personal gain, at the detriment of the Nigerian populace, the consequences of those things will definitely catch up with you and others like you in the future. Even if you all have passed on by then, your relatives and all those that might have inherited those proceeds of corruption will face the consequences.

One thing about corruption is that it has the tendency to consume itself. All you need are people that are willing to fight and have what it takes to fight the corrupt system, all that is left is to exploit the loopholes created by the system itself.
Food › Re: Would You Buy This ₦1 Million Sallah Ram? (Photo) by turmacs(f): 12:02pm On Jun 13, 2024
Wait please who are you people asking all this king questions so? Is it the same Nigeria that 99.4% of all the bank accounts have less than 500k in them? na them una dey ask all these one's so?
Programming › Re: Let us see the real programmers. Not Every Time Here Frontend, Backend, React. by turmacs(op): 8:30am On Jun 13, 2024
tosinhtml:
So DevDevDev is no longer anonymous? She has finally showed us her real account grin grin grin
Who is this DevDevDev abeg? undecided the other guy say na TastedFriedPussy... Na wa ohh.
Programming › Re: Let us see the real programmers. Not Every Time Here Frontend, Backend, React. by turmacs(op): 10:36pm On Jun 12, 2024
PulsingPurple:
Hope Cloudflare finally allows me to post 😑

This is the updated response from Google's Gemini Advanced

After getting the first code which I've removed, I tried to run it but it didn't run, so the AI debugged the code till it eventually ran...
Wow this is actually correct and I am really surprised that it could solve it (although this a very easy problem). Chatgpt just solved nonsense. So no software engineer on NL could solve this till now? wonderfull.
Programming › Re: Let us see the real programmers. Not Every Time Here Frontend, Backend, React. by turmacs(op): 8:47pm On Jun 12, 2024
airsaylongcome:
OP, you know that there's AI that can write fully functional code that solves this. I Just threw it at my "weak" self hosted LLM and it has churned out Python and C++ code that look workable
Lolzzz.. Except your "LLM" or "AI" is better than chatgpt, i don't think it can solve this one because chatgpt could not solve it. No be by cho , cho , cho, show workings grin Post the solution here let us see it.
Programming › Re: Let us see the real programmers. Not Every Time Here Frontend, Backend, React. by turmacs(op): 6:50pm On Jun 12, 2024
RealLordZeus:
I no get strength to attempt without money grin grin
na so, just say you can't solve it, nobody will mock you.
Programming › Let us see the real programmers. Not Every Time Here Frontend, Backend, React. by turmacs(op):
You can attempt the problem with any language you are comfortable with.

Problem statement
you are given an n by m grid (n is the number of rows and m is the number of columns), the grid only contains just the characters '*' and '#', a whole manhattan circle exit's on the grid. The coordinates of the top left corner and bottom right corner of this grid are (1,1) and (n,m) respectively.

The point (a,b) is a part of the manhattan circle which is centered at (h,k) if | h - a | + | k - b | < r , where r is a positive constant and | x - y | represents the absolute value of x - y.

On this grid, all points that are a part of the manhattan circle are denoted by the '#' character. Your task is to find the coordinates of the circles center.

Input
The first line contains t ( 1 <= t <= 1000) --- The number of testcases.
The first line of each testcase contain n and m (1 <= n *m <= 2*105) which both stand for the height and width of the grid respectively.

The next n lines contain m characters that are either '.' or '#'. If the character is '#', then you know that the point is a part of the circle.

Output
For each t, your code has to print two integers, the coordinates of the circles center.


Example
Input
6
5 5
*****
*****
**#**
*****
*****
5 5
**#**
*###*
#####
*###*
**#**
5 6
******
******
*#****
###***
*#****
1 1
#
5 6
***#**
**###*
*#####
**###*
***#**
2 10
**********
***#******

Output
3 3
3 3
4 2
1 1
3 4
2 4



Let us see those that are real programmers smiley

nlfpmod mynd44 farano dominique, is this fun enough for front page?
Investment › Re: Crypto Currency Investors Thread by turmacs(f): 7:03pm On Jun 11, 2024
iLegendd:
The people calling crypto Ponzi are either too religious or poor.

These people are just waiting for something bad to happen so they can crawl out and laugh. For me, I said BTC will never go below 56k this year, but deep down, I want it to so that these entities will mock me without knowing I actually took advantage of the fall.

If crypto, an invention of an Asian man with some white men is Ponzi, what will you also call the religion Asian and white men brought into Africa?

I'm not saying religion is a Ponzi, either am I saying it's not, but if you're calling crypto a Ponzi because of religious belief and you lost money in MMM, then remember the source of your religion is from those same men from the other side of the continent.
preach bro, preach!!!!
Investment › Re: Crypto Currency Investors Thread by turmacs(f): 11:39am On Jun 11, 2024
itzzkhaliii:
Wow please tell me more? Are you really talking from experience?
These kind of Hybrid laptops no even get fan Mr man/Woman I have sold more than 10 units and I specialise on Mainly touchscreen laptops,all the ones i sold no any issue whatsoever.
What will be your gain if you spoil my own market? Abi na one kind old model you go buy,do you know the Hp elite? Have you used it before?
Madam/Man you are clearly lying here no any experience whatsoever This kind laptops only get chip no fan in them.
I know you will try to defend the indefensible and I'll not waste my time much with you. The model i bought had a fan in it( can't remembered the name because i sold it). The one you're even Selling doesn't even have a fan(you said it's chip) and I'm assuming you meant airjet tech from companies like frore systems. That one is even worse because that technology is in it's infancy and still not as efficient as the traditional fan system. With the specs of that laptop, it's bound to overheat. If you want to try me, install blender and try to render a simple low poly scene, the heat from that laptop go cook beans. I'm not your average tech savvy person and i know what I'm talking about. Even you wey dey sell system no know system reach me so rest. The people that you claimed you sold 10 units to most probably don't know what they're buying so I'm not surprised and you shouldn't even be bragging with that.
Investment › Re: Crypto Currency Investors Thread by turmacs(f): 11:26am On Jun 11, 2024
itzzkhaliii:
Detachable Touchscreen
Hp Elite X2 1012.
Direct From USA.
Clean like new.
Lagos Ikeja(Computer Village)

Bosses them make Una patronise your boy.
please nobody should buy this types of laptops. All these laptops with detachable screens. The screens are not durable at all, they easily get spoilt and the price to repair/replace them is something else. Not to even mention the heating issues, fan go dey sound like generator but still laptop go dey hot like hot plate. The heat causes the systems to hang alot and most programs crash abruptly.

Talking from experience.
Investment › Re: Crypto Currency Investors Thread by turmacs(f):
you people should better go and be holding ADA(cardano), i don talk my own. I see an easy 2x loading.
Investment › Re: Crypto Currency Investors Thread by turmacs(f): 10:53am On Jun 11, 2024
GovernmentAgent:
Those of you who were planning to buy Mercedes-Benz GLK from crypto pump this year...how market? grin

Even all the so-called crypto experts are confused.

Crypto is a Ponzi Scheme, know the truth and the truth shall set you free!
Bro abeg go and sit down, bull run is over. I bought solana @ $20 last year with 500k and it's only me and my God that knows how much I'm sitting on. The people that are reaping profits this year are those that bought coins like solana last year that pumped into the New year. I remember when i made a post telling people to go and buy solana when it was still around 20, one mumu called me a goat here. if you used at least 1-2M to hold that coin till now, you for don buy the GLK this year.

Education › Re: Long, Black Snake Spotted At A Hostel (Video) by turmacs(f):
This one una just dey see snakes everywhere. They be looking like all these possessed Nigerian men boys... Any guy above 23 years old, who doesn't have a car, a house/Landed properties, and at least 100M in his account is a possessed failure, those sets of guys wine and dine with marine spirits.

1 2 3 4 5 6 7 8 9 10 (of 24 pages)