Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
AlexAvram
Untitled
AlexAvram
Jun 5th, 2025
209
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
C++
0.62 KB
| None
|
0
0
raw
download
clone
embed
print
report
//#1860 BlackFriday
#include <fstream>
using
namespace
std
;
ifstream fin
(
"blackfriday.in"
)
;
ofstream fout
(
"blackfriday.out"
)
;
int
main
(
)
{
int
n, pret1
[
11
]
, pret2
[
11
]
;
fin
>>
n
;
for
(
int
i
=
1
;
i
<=
n
;
++
i
)
fin
>>
pret1
[
i
]
;
for
(
int
i
=
1
;
i
<=
n
;
++
i
)
fin
>>
pret2
[
i
]
;
int
dif, indice
;
double
procent, procent_max
=
-
1
;
for
(
int
i
=
1
;
i
<=
n
;
++
i
)
{
dif
=
pret1
[
i
]
-
pret2
[
i
]
;
procent
=
(
dif
*
100
)
/
pret1
[
i
]
;
if
(
procent
>
procent_max
)
{
procent_max
=
procent
;
indice
=
i
;
}
}
fout
<<
indice
;
return
0
;
}
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
Untitled
9 min ago | 15.69 KB
Untitled
2 hours ago | 15.44 KB
Untitled
4 hours ago | 16.58 KB
Untitled
6 hours ago | 18.71 KB
JetsMinions Error
6 hours ago | 4.63 KB
Untitled
8 hours ago | 20.76 KB
Untitled
10 hours ago | 19.42 KB
hcl sort
Awk | 10 hours ago | 2.78 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
AltStyle
によって変換されたページ
(->オリジナル)
/
アドレス:
モード:
デフォルト
音声ブラウザ
ルビ付き
配色反転
文字拡大
モバイル