Submission #6526460
Source Code Expand
#include<bits/stdc++.h>
using namespace std;
inline void rd(int &x){
int k, m=0;
x=0;
for(;;){
k = getchar_unlocked();
if(k=='-'){
m=1;
break;
}
if('0'<=k&&k<='9'){
x=k-'0';
break;
}
}
for(;;){
k = getchar_unlocked();
if(k<'0'||k>'9'){
break;
}
x=x*10+k-'0';
}
if(m){
x=-x;
}
}
inline void wt_L(char a){
putchar_unlocked(a);
}
inline void wt_L(int x){
char f[10];
int m=0, s=0;
if(x<0){
m=1;
x=-x;
}
while(x){
f[s++]=x%10;
x/=10;
}
if(!s){
f[s++]=0;
}
if(m){
putchar_unlocked('-');
}
while(s--){
putchar_unlocked(f[s]+'0');
}
}
int main(){
int K, N;
rd(N);
rd(K);
wt_L(N + 1 - K);
wt_L('\n');
return 0;
}
// cLay varsion 20190721-1
// --- original code ---
// {
// int N, K;
// rd(N, K);
// wt(N + 1 - K);
// }
Submission Info
| Submission Time | |
|---|---|
| Task | A - Train |
| User | LayCurse |
| Language | C++14 (GCC 5.4.1) |
| Score | 100 |
| Code Size | 937 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 256 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 0_00.txt, 0_01.txt, 0_02.txt |
| All | 0_00.txt, 0_01.txt, 0_02.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 0_00.txt | AC | 1 ms | 256 KiB |
| 0_01.txt | AC | 1 ms | 256 KiB |
| 0_02.txt | AC | 1 ms | 256 KiB |
| 1_00.txt | AC | 1 ms | 256 KiB |
| 1_01.txt | AC | 1 ms | 256 KiB |
| 1_02.txt | AC | 1 ms | 256 KiB |
| 1_03.txt | AC | 1 ms | 256 KiB |
| 1_04.txt | AC | 1 ms | 256 KiB |