HDU 1597 (concentrated emotion)

Source: Internet
Author: User

/*
When I did this question for the second time, I finally found that the question was very watery. When I did it for the first time, I had timed out and made great improvements in the code that had timed out.
However, the efficiency is still not very high. I suddenly feel that mathematics is of great use to ACM.
I feel that ACM has been very fulfilling, and I do not know whether it will help in the future, but I obviously feel that my programming capability has been enhanced.
I have learned a lot since Zhong Chao and Zhang erdong, especially the ability to analyze problems, the methods to analyze problems, and the gap between them. I should use my efforts to make up for it,
As for tomorrow's provincial competition, I think I will do my best, no matter what the outcome is, no matter whether it is .... Maybe some things are not important. The key is the process, and of course the result.
Better. Come on! After renewal, I will continue to cheer! No matter how difficult the algorithm is, I want to learn them well. If not, I can start with Ctrl + A Ctrl + C Ctrl + v.
At the same time, I would like to thank my girlfriend for her support and understanding. Although there are many unhappy conflicts between them, we continue to work together and depend on each other,
In fact, sometimes a warm greeting, a smile, a simple surprise, is what she wants most. In the past, I was the source of our contradictions,
Even if you are busy making another phone call, you should have enough time, even if you are tired of sending another text message. A person does not express his or her mind to a person,
The conflict between lovers should be that they do not make the other Party feel that you care about her. Sometimes she wants something very simple, especially girls, and sometimes girls are easy to say what they want.
They told you not to make a phone call, so they should be beaten. Sometimes they are still very angry, because after she falls in love with you, there is no medicine to save, only you care.
Only when you care about it can you fill your life without you. Boys should be obviously generous. You must tolerate her coquetry. You must learn to coax her, especially first love.
Girl. It's really hard for 295 days. From the beginning, there is no end to the vow to use action! Do not care about distance. In the future, parents' attitude,
This is the most important thing for two people to really pay for each other together. Use action to eliminate the hidden barriers on each other's layers! I really want to be obedient in the future,
Your world is tomorrow! Which one will come first in the future and tomorrow ?? I finally understand this problem that I once did not understand.
*/
# Include <iostream> // 2348147 2010-04-16 14:48:19 accepted 1597 15 ms 288 K 420 B C ++ regret
# Include <cmath>
# Include <cstdio>
Using namespace STD;
Int main ()
{
Long long int n, x; // prevent out of range
Double Y;
Int T;
Cin> T;
While (t --)
{
Cin> N;
Y = (SQRT (1.0 + 8 * n)-1)/2;
If (INT (y) = y)
{
X = long int (y );
}
Else
{
X = long int (y) + 1;
}
N = N-(x-1) * X/2;
If (N % 9 = 0)
Printf ("9/N ");
Else
Printf ("% i64d/N", N % 9 );
}
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.