Submission #13920372


Source Code Expand

Copy
#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
            ∧_∧
      ∧_∧  (´<_` )  Welcome to My Coding Space!
     ( ´_ゝ`) /  ⌒i     @hamayanhamayan0
    /   \     | |
    /   / ̄ ̄ ̄ ̄/  |
  __(__ニつ/     _/ .| .|____
     \/____/ (u ⊃
---------------------------------------------------------------------------------------------------*/














ll A, B1, B2;
//---------------------------------------------------------------------------------------------------
void _main() {
	scanf("%lld %lld.%lld", &A, &B1, &B2);

	ll ans = A * (B1 * 100 + B2) / 100;
	cout << ans << endl;
}





Submission Info

Submission Time
Task C - Multiplication 3
User hamayanhamayan
Language C++ (GCC 9.2.1)
Score 300
Code Size 1528 Byte
Status AC
Exec Time 3 ms
Memory 3744 KB

Compile Error

./Main.cpp: In function ‘void _main()’:
./Main.cpp:38:7: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
   38 |  scanf("%lld %lld.%lld", &A, &B1, &B2);
      |  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Judge Result

Set Name Sample All after_contest
Score / Max Score 0 / 0 300 / 300 0 / 0
Status
AC × 3
AC × 20
AC × 2
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All sample_01.txt, sample_02.txt, sample_03.txt, hand_01.txt, hand_02.txt, hand_03.txt, random_01.txt, random_02.txt, random_03.txt, random_11.txt, random_12.txt, random_13.txt, random_21.txt, random_22.txt, random_23.txt, random_31.txt, random_32.txt, random_33.txt, zero_01.txt, zero_02.txt
after_contest after_contest_01.txt, after_contest_02.txt
Case Name Status Exec Time Memory
after_contest_01.txt AC 3 ms 3740 KB
after_contest_02.txt AC 2 ms 3740 KB
hand_01.txt AC 2 ms 3532 KB
hand_02.txt AC 2 ms 3608 KB
hand_03.txt AC 2 ms 3608 KB
random_01.txt AC 3 ms 3580 KB
random_02.txt AC 2 ms 3580 KB
random_03.txt AC 2 ms 3744 KB
random_11.txt AC 2 ms 3736 KB
random_12.txt AC 2 ms 3628 KB
random_13.txt AC 2 ms 3632 KB
random_21.txt AC 2 ms 3624 KB
random_22.txt AC 2 ms 3584 KB
random_23.txt AC 2 ms 3540 KB
random_31.txt AC 3 ms 3736 KB
random_32.txt AC 2 ms 3544 KB
random_33.txt AC 2 ms 3576 KB
sample_01.txt AC 2 ms 3540 KB
sample_02.txt AC 2 ms 3604 KB
sample_03.txt AC 2 ms 3580 KB
zero_01.txt AC 2 ms 3536 KB
zero_02.txt AC 2 ms 3540 KB