0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-03 19:16:27 +00:00

716. 最大数和它的位置

https://www.acwing.com/problem/content/submission/code_detail/6943184/
This commit is contained in:
Baoshuo Ren 2021-08-06 18:48:57 +08:00
parent 58db81b52b
commit 54ec15dc5a
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

21
AcWing/716/716.cpp Normal file
View File

@ -0,0 +1,21 @@
#include <bits/stdc++.h>
using namespace std;
int t, ans1, ans2;
int main() {
for (int i = 1; i <= 100; i++) {
cin >> t;
if (t > ans1) {
ans1 = t;
ans2 = i;
}
}
cout << ans1 << endl
<< ans2 << endl;
return 0;
}