結果

問題 No.1415 100の倍数かつ正整数(1)
ユーザー aa
提出日時 2021-03-05 21:30:54
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 2,977 bytes
コンパイル時間 1,850 ms
コンパイル使用メモリ 166,520 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-16 08:50:37
合計ジャッジ時間 2,555 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 2 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 2 ms
5,376 KB
testcase_17 AC 2 ms
5,376 KB
testcase_18 AC 2 ms
5,376 KB
testcase_19 AC 2 ms
5,376 KB
testcase_20 AC 2 ms
5,376 KB
testcase_21 AC 2 ms
5,376 KB
testcase_22 AC 2 ms
5,376 KB
testcase_23 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
// #include <boost/multi_array.hpp>
// #include <boost/optional.hpp>
// #include <boost/range/irange.hpp>
// #include <boost/range/algorithm.hpp>
// #include <boost/range/adaptors.hpp>
// #include <atcoder/all>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using P = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vi>;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep2(i, x, n) for(int i = x; i < (n); i++)
#define all(n) begin(n), end(n)
const int INF = 1e9;
const long long llINF = 1LL << 60;

void print() { cout << endl; }

template <class Head, class... Tail> void print(Head &&head, Tail &&...tail) {
    cout << head;
    if(sizeof...(tail) != 0)
        cout << " ";
    print(forward<Tail>(tail)...);
}

template <class T> void print(vector<T> &vec) {
    for(auto &a : vec) {
        cout << a;
        if(&a != &vec.back())
            cout << " ";
    }
    cout << endl;
}

template <class T> void print(vector<vector<T>> &df) {
    for(auto &vec : df) {
        print(vec);
    }
}

string conv(string s) {
    rep(i, s.size()) s[i] ^ 32;
    return s;
}

class Radix {
  private:
    const char *s;
    int a[128];

  public:
    Radix(const char *s = "0123456789ABCDEF") : s(s) {
        int i;
        for(i = 0; s[i]; ++i)
            a[(int)s[i]] = i;
    }
    std::string to(long long p, int q) {
        int i;
        if(!p)
            return "0";
        char t[64] = {};
        for(i = 62; p; --i) {
            t[i] = s[p % q];
            p /= q;
        }
        return std::string(t + i + 1);
    }
    std::string to(const std::string &t, int p, int q) {
        return to(to(t, p), q);
    }
    long long to(const std::string &t, int p) {
        int i;
        long long sm = a[(int)t[0]];
        for(i = 1; i < (int)t.length(); ++i)
            sm = sm * p + a[(int)t[i]];
        return sm;
    }
};

vector<long long> calc_factorial(int n, int mod) {
    vector<long long> factorial(n + 1);
    factorial[0] = 1; // 0 の階乗は 1
    for(int i = 1; i <= n; i++) {
        factorial[i] = (factorial[i - 1] * i) % mod;
    }
    return factorial;
}

template <typename T> vector<pair<T, T>> prime_factor(T n) {
    vector<pair<T, T>> ret;
    for(T i = 2; i * i <= n; i++) {
        if(n % i != 0)
            continue;
        T tmp = 0;
        while(n % i == 0) {
            tmp++;
            n /= i;
        }
        ret.push_back(make_pair(i, tmp));
    }
    if(n != 1)
        ret.push_back(make_pair(n, 1));
    return ret;
}

void Main() {
    string n;
    cin >> n;
    if(n[0] == '-') {
        cout << 0 << endl;
        return;
    }
    if(n.size() < 3) {
        cout << 0 << endl;
        return;
    }
    cout << n.substr(0, n.size() - 2) << endl;
}

int main() {
    std::cin.tie(nullptr);
    std::ios_base::sync_with_stdio(false);
    std::cout << std::fixed << std::setprecision(4);
    Main();
    return 0;
}
0