当前位置:网站首页>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;
}
边栏推荐
- Formation of mil-100 (FE) coated small molecule aspirin [email protected] (FE) | glycyrrhetinic acid modified metal organ
- 中国锂电池电解液行业市场专项调研报告(2022版)
- Metal organic framework material zif-8 containing curcumin( [email protected] Nanoparticles) | nano metal organic framework carry
- Leetcode (4) -- find the median of two positively ordered arrays
- JS shift operators (< <,> > and > > >)
- 中国PETG市场预测及战略研究报告(2022版)
- JS input number and standard digit number are compared. The problem of adding 0 to 0
- 泰凌冲刺科创板:拟募资13亿 国家大基金与小米长江是股东
- allegro,orcad, net alias,port,off-page connector之间的异同点和如何选取
- 修改数据库中的记录为什么报这个错
猜你喜欢

Scroll detection of the navigation bar enables the navigation bar to slide and fix with no content
[email protected] Nanoparticles) | nano metal organic framework carry"/>Metal organic framework material zif-8 containing curcumin( [email protected] Nanoparticles) | nano metal organic framework carry

好看、好用、强大的手写笔记软件综合评测:Notability、GoodNotes、MarginNote、随手写、Notes Writers、CollaNote、CollaNote、Prodrafts、Noteshelf、FlowUs、OneNote、苹果备忘录

NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线

Leetcode(4)——尋找兩個正序數組的中比特數

Similarities and differences between Allegro, OrCAD, net alias, port, off page connector and how to select them

7-11 calculation of residential water charges by sections

Redis:字符串类型数据的操作命令

Exercise 10-2 recursive factorial sum

x86汇编语言-从实模式到保护模式 笔记
随机推荐
GRPC的四种数据流以及案例
Configure stylelint
x86汇编语言-从实模式到保护模式 笔记
常见问题之PHP——ldap_add(): Add: Undefined attribute type in
Leetcode (4) -- find the median of two positively ordered arrays
Nucleic acid modified metal organic framework drug carrier | pcn-223 metal organic framework encapsulated ad adamantane | zif-8 encapsulated adriamycin (DOX)
Raft agreement
JS matrix zero
JS download files through URL links
Exercise 10-3 recursive implementation of exponential functions
天图投资冲刺港股:资产管理规模249亿 投了小红书与奈雪
JS Part 2
信创产业现状、分析与预测
The small project (servlet+jsp+mysql+el+jstl) completes a servlet with login function, with the operation of adding, deleting, modifying and querying. Realize login authentication, prevent illegal log
js 2023. String pair equal to the target string after connection
Page generation QR code
Webpage connection database ~ simple implementation of addition, deletion, modification and query complete code
Leetcode(4)——尋找兩個正序數組的中比特數
Jiuyi cloud black free encryption free version source code
Cross linked cyclodextrin metal organic framework loaded methotrexate slow-release particles | metal organic porous material uio-66 loaded with flavonoid glycosides | Qiyue