提出 #25404710


ソースコード 拡げる

#include <bits/stdc++.h>
//#include <atcoder/all>
//using namespace atcoder;
//#include <boost/multiprecision/cpp_int.hpp>
//#include <boost/multiprecision/cpp_dec_float.hpp>
//using namespace boost::multiprecision;
using namespace std;

#pragma region Macros
using ll = long long;
#define int ll
using pii = pair<int, int>;
using tiii = tuple<int, int, int>;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V<V<T>>;
#define IOS\
    ios::sync_with_stdio(false);\
    cin.tie(0);\
    cout.tie(0);
#define FOR(i,l,r) for(int i=(l);i<int(r);++i)
#define REP(i,n) FOR(i,0,n)
#define REPS(i,n) FOR(i,1,n+1)
#define RFOR(i,l,r) for(int i=(l);i>=int(r);--i)
#define RREP(i,n) RFOR(i,n-1,0)
#define RREPS(i,n) RFOR(i,n,1)
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back
#define all(x) (x).begin(),(x).end()
#define SORT(name) sort(name.begin(), name.end())
#define RSORT(name)\
    SORT(name);\
    reverse(all(name));
#define ZERO(p) memset(p, 0, sizeof(p))
#define MINUS(p) memset(p, -1, sizeof(p))
inline void Yes(bool b = true) {cout << (b ? "Yes" : "No") << '\n';}
inline void YES(bool b = true) {cout << (b ? "YES" : "NO") << '\n';}
template <class T> inline void print(T x){ cout << x << '\n';}
template<typename T1,typename T2> inline void chmin(T1 &a, T2 b){ if(a > b) a = b; }
template<typename T1,typename T2> inline void chmax(T1 &a, T2 b){ if(a < b) a = b; }

const ll LLINF = (1LL<<60);
const int INF = (1LL<<30);
const double DINF = std::numeric_limits<double>::infinity();
#pragma endregion

const int MOD = 1000000007;
//const int MOD = 998244353;

#if 1
#  define DBG(fmt, ...) printf(fmt, ##__VA_ARGS__)
#else
#  define DBG(fmt, ...)
#endif

const int MAX_N = 200010;

signed main() {
    IOS;
    string S;
    cin >> S;
    int x = stoi(S);
    int y = S[S.length() - 1] - '0';
    if(y >= 0 && y <= 2) {
        printf("%lld-\n", x);
    }
    else if(y >= 3 && y <= 6) {
        printf("%lld\n", x);
    }
    else {
        printf("%lld+\n", x);
    }

    return 0;
}

提出情報

提出日時
問題 A - Signed Difficulty
ユーザ VTR
言語 C++ (GCC 9.2.1)
得点 100
コード長 2062 Byte
結果 AC
実行時間 7 ms
メモリ 3744 KiB

コンパイルエラー

./Main.cpp:9: warning: ignoring #pragma region Macros [-Wunknown-pragmas]
    9 | #pragma region Macros
      | 
./Main.cpp:46: warning: ignoring #pragma endregion  [-Wunknown-pragmas]
   46 | #pragma endregion
      | 

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 3
AC × 10
セット名 テストケース
Sample example0.txt, example1.txt, example2.txt
All 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, example0.txt, example1.txt, example2.txt
ケース名 結果 実行時間 メモリ
000.txt AC 7 ms 3744 KiB
001.txt AC 2 ms 3624 KiB
002.txt AC 2 ms 3716 KiB
003.txt AC 2 ms 3580 KiB
004.txt AC 1 ms 3744 KiB
005.txt AC 2 ms 3708 KiB
006.txt AC 2 ms 3684 KiB
example0.txt AC 3 ms 3680 KiB
example1.txt AC 2 ms 3636 KiB
example2.txt AC 2 ms 3584 KiB