Submission #1946645


Source Code Expand

#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <sstream>
#include <functional>
#include <map>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <list>
#include <numeric>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> P;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const ll INF = 1LL<<29;
const ll mod = 1e9+7;
#define rep(i,n) for(int (i)=0;(i)<(ll)(n);++(i))
#define repd(i,n,d) for(ll (i)=0;(i)<(ll)(n);(i)+=(d))
#define all(v) (v).begin(), (v).end()
#define pb(x) push_back(x)
#define mp(x,y) make_pair((x),(y))
#define mset(m,v) memset((m),(v),sizeof(m))
#define chmin(x,y) (x=min(x,y))
#define chmax(x,y) (x=max(x,y))
#define fst first
#define snd second
#define UNIQUE(x) (x).erase(unique(all(x)),(x).end())
template<class T> ostream &operator<<(ostream &os, const vector<T> &v){int n=v.size();rep(i,n)os<<v[i]<<(i==n-1?"":" ");return os;}

int main(){
	ll a, b, c, d;
	string s;
	scanf("%d/%d/%d", &a, &b, &c);
	printf("%04d/%02d/%02d\n", a+1, b, c);
	return 0;
}

Submission Info

Submission Time
Task A - Already 2018
User Lepton
Language C++14 (GCC 5.4.1)
Score 100
Code Size 1263 Byte
Status AC
Exec Time 1 ms
Memory 256 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:44:30: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘ll* {aka long long int*}’ [-Wformat=]
  scanf("%d/%d/%d", &a, &b, &c);
                              ^
./Main.cpp:44:30: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘ll* {aka long long int*}’ [-Wformat=]
./Main.cpp:44:30: warning: format ‘%d’ expects argument of type ‘int*’, but argument 4 has type ‘ll* {aka long long int*}’ [-Wformat=]
./Main.cpp:45:38: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘ll {aka long long int}’ [-Wformat=]
  printf("%04d/%02d/%02d\n", a+1, b, c);
                                      ^
./Main.cpp:45:38: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘ll {aka long long int}’ [-Wformat=]
./Main.cpp:45:38: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘ll {aka long long int}’ [-Wformat=]
./Main.cpp:44:31: warning: ignoring r...

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 8
Set Name Test Cases
Sample a01, a02
All a01, a02, b03, b04, b05, b06, b07, b08
Case Name Status Exec Time Memory
a01 AC 1 ms 256 KB
a02 AC 1 ms 256 KB
b03 AC 1 ms 256 KB
b04 AC 1 ms 256 KB
b05 AC 1 ms 256 KB
b06 AC 1 ms 256 KB
b07 AC 1 ms 256 KB
b08 AC 1 ms 256 KB