Submission #41540612
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,n) for(int i = 0;i<(int)(n);i++)
#define repi(i,a,b) for(int i = int(a);i < int(b);i++)
#define all(x) (x).begin(),(x).end()
#define F first
#define S second
#define pb push_back
#define UNIQUE(s) s.erase(unique(s.begin(), s.end()), s.end())
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const long long INF = 1LL << 60;
const int dx[4] = {1,0,-1,0};
const int dy[4] = {0,1,0,-1};
int main() {
ll a,b;
cin>>a>>b;
ll ans=a/b;
if(a%b==0){
cout<<ans;
return 0;
}
cout<<ans+1<<endl;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Attack |
| User | HATO1114 |
| Language | C++ (GCC 9.2.1) |
| Score | 100 |
| Code Size | 747 Byte |
| Status | AC |
| Exec Time | 7 ms |
| Memory | 3600 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example_00.txt, example_01.txt, example_02.txt |
| All | example_00.txt, example_01.txt, example_02.txt, test_00.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| example_00.txt | AC | 7 ms | 3540 KiB |
| example_01.txt | AC | 2 ms | 3516 KiB |
| example_02.txt | AC | 2 ms | 3524 KiB |
| test_00.txt | AC | 1 ms | 3492 KiB |
| test_01.txt | AC | 1 ms | 3572 KiB |
| test_02.txt | AC | 2 ms | 3516 KiB |
| test_03.txt | AC | 2 ms | 3600 KiB |
| test_04.txt | AC | 2 ms | 3540 KiB |
| test_05.txt | AC | 3 ms | 3340 KiB |
| test_06.txt | AC | 2 ms | 3408 KiB |
| test_07.txt | AC | 2 ms | 3484 KiB |
| test_08.txt | AC | 2 ms | 3544 KiB |
| test_09.txt | AC | 2 ms | 3476 KiB |
| test_10.txt | AC | 2 ms | 3572 KiB |
| test_11.txt | AC | 2 ms | 3492 KiB |