提出 #66084449


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define LONGMAX 1e18
#define INTMAX 2147483647

template <typename T> void show(const vector<T>& a) {
    if (a.empty()) {
        cout << "empty" << endl;
        return;
    }
    for (size_t i = 0; i < a.size() - 1; ++i) {
        cout << a[i] << " ";
    }
    cout << a.back() << endl;
}

void aaaaa(void){
    cout << "aaaaa" << endl;
    return;
}

int main(void){
    int A, B; cin >> A >> B;
    double AB = (double)A/B;
    if((AB-(int)(AB))<0.5){
        cout << (int)(AB) << endl;
    }else{
        cout << (int)(AB)+1 << endl;
    }
    return 0;
}

// while (std::cin >> a >> b) {
// }

// int array[]={1,2,3,4};
// do{
//     for(int i=0; i<4; i++){
//         cout<<array[i];
//  	if(i!=3)cout<<" ";
//    }
//    cout<<endl;
//}while(next_permutation(array,array+4));

// struct Edge {
//     int to;
//     ll w;
//     Edge(int to, ll w) : to(to), w(w) {}
// };

// using Graph = vector<vector<Edge>>;

// cout << fixed << setprecision(10);

提出情報

提出日時
問題 A - Approximation
ユーザ lashvbq
言語 C++ 20 (gcc 12.2)
得点 150
コード長 1080 Byte
結果 AC
実行時間 1 ms
メモリ 3656 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 150 / 150
結果
AC × 3
AC × 13
セット名 テストケース
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_handmade_03.txt, 01_handmade_04.txt, 01_handmade_05.txt, 01_handmade_06.txt, 02_random_07.txt, 02_random_08.txt, 02_random_09.txt, 02_random_10.txt, 02_random_11.txt, 02_random_12.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 1 ms 3656 KiB
00_sample_01.txt AC 1 ms 3456 KiB
00_sample_02.txt AC 1 ms 3460 KiB
01_handmade_03.txt AC 1 ms 3436 KiB
01_handmade_04.txt AC 1 ms 3436 KiB
01_handmade_05.txt AC 1 ms 3504 KiB
01_handmade_06.txt AC 1 ms 3460 KiB
02_random_07.txt AC 1 ms 3440 KiB
02_random_08.txt AC 1 ms 3452 KiB
02_random_09.txt AC 1 ms 3500 KiB
02_random_10.txt AC 1 ms 3500 KiB
02_random_11.txt AC 1 ms 3440 KiB
02_random_12.txt AC 1 ms 3508 KiB