結果

問題 No.1415 100の倍数かつ正整数(1)
ユーザー Mister
提出日時 2021-03-05 21:22:44
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 420 bytes
コンパイル時間 518 ms
コンパイル使用メモリ 67,072 KB
最終ジャッジ日時 2025-01-19 10:30:34
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

#line 1 "main.cpp"
#include <iostream>
#include <string>

using namespace std;

void solve() {
    string s;
    cin >> s;

    if (s.front() == '-') {
        cout << "0\n";
        return;
    }

    for (int q = 0; q < 2 && !s.empty(); ++q) s.pop_back();
    if (s.empty()) s.push_back('0');
    cout << s << "\n";
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    solve();

    return 0;
}
0