当前位置:网站首页>7-19 check denomination (solve binary linear equation)
7-19 check denomination (solve binary linear equation)
2022-07-03 14:14:00 【Big fish】
A buyer went to the bank to exchange a y element f Split check , As a result, the cashier gave it to f element y branch . The buyer used n I didn't find anything wrong until I got a score , So I counted the balance and there was still 2y element 2f branch , Ask what the face value of the check is ?
Input format :
The input gives less than... On one line 100 The positive integer n.
Output format :
In one line by format y.f Output the original face value of the check . If there is no solution , The output No Solution.
sample input 1:
23
sample output 1:
25.51
sample input 2:
22
sample output 2:
No SolutionBrute force :
#include<stdio.h>
int main()
{
int n,y=0,f=0;
scanf("%d",&n);
//98f-n=199y;
int i=0;
for(y=0;y<100;y++)
{
for(f=0;f<100;f++)
{
if(98*f-n==199*y)
{
printf("%d.%d",y,f);
i=1;
}
}
}
if(i!=1)
printf("No Solution\n");
return 0;
}
边栏推荐
- NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线
- Solve the problem of dormitory router campus network sharing login
- 关于回溯问题中的排列问题的思考(LeetCode46题与47题)
- Comprehensive evaluation of good-looking, easy-to-use and powerful handwriting note taking software: notability, goodnotes, marginnote, handwriting, notes writers, collanote, collanote, prodrafts, not
- Exercise 10-3 recursive implementation of exponential functions
- Page generation QR code
- 信创产业现状、分析与预测
- 中感微冲刺科创板:年营收2.4亿净亏1782万 拟募资6亿
- 消息订阅与发布
- Interface for querying IP home
猜你喜欢

Exercise 8-7 string sorting

TS code automatically generates JS

7-11 calculation of residential water charges by sections

Metal organic framework (MOFs) antitumor drug carrier | pcn-223 loaded with metronidazole | uio-66 loaded with ciprofloxacin hydrochloride(

FPGA test method takes mentor tool as an example

Leetcode (4) - - trouver la médiane de deux tableaux ordonnés positifs

Redis: operation command of string type data

必贝特医药冲刺科创板:年营收97万亏损1.37亿 拟募资20亿

Mysql多表查询 #子查询

Example analysis of QT learning 18 login dialog box
随机推荐
QT learning 20 standard dialog box in QT (middle)
Exercise 7-6 count capital consonants
Vite project commissioning
Common mixins
C language,%d% Difference between 2D%2d%02d
虽然不一定最优秀,但一定是最努力的!
QT learning 21 standard dialog box in QT (Part 2)
js . Find the first palindrome string in the array
Nucleic acid modified metal organic framework drug carrier | pcn-223 metal organic framework encapsulated ad adamantane | zif-8 encapsulated adriamycin (DOX)
Programmable logic device software testing
天图投资冲刺港股:资产管理规模249亿 投了小红书与奈雪
信创产业现状、分析与预测
QT learning 24 layout manager (III)
TS code automatically generates JS
simpleParallax. JS (create poor visual effects for website pictures)
玖逸云黑免费无加密版本源码
Exercise 6-6 use a function to output an integer in reverse order
GRPC的四种数据流以及案例
allegro,orcad, net alias,port,off-page connector之间的异同点和如何选取
Exercise 10-3 recursive implementation of exponential functions