Submission #3230594
Source Code Expand
/*
結果:
*/
#define _USE_MATH_DEFINES
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>
#include <stdbool.h>
#define inf (INT_MAX-1)
#define INF 9223372036854775807
#define PI 3.14159265358979323846;
#define EPS 1e-10
#define sq(n) ((n)*(n))
#define rep(i,n) for(i=0;i<n;i++)
#define rev(i,n) for(i=n-1;i>=0;i--)
#define sort(a,n) qsort(a,n,sizeof(TYPE),cmp)
#define sort_r(a,n) qsort(a,n,sizeof(TYPE),cmp_r)
#define chsort(s,n) qsort(s,n,sizeof(char),cmp)
#define chsort_r(s,n) qsort(s,n,sizeof(char),char_cmp_r)
#define TYPE long long
#define ll long long
#define MEMSET(a) memset(a,0,sizeof(a))
#define MEMSET_U(a) memset(a,-1,sizeof(a))
const int mod = (int)1e09 + 7;
//#define DEBUG1
//#define DEBUG2
//#define DEBUGF
#define DUMMY
int in(void) { int i; scanf("%d", &i); return i; }
long long llin(void) { long long i; scanf("%lld", &i); return i; }
double din(void) { double i; scanf("%lf", &i); return i; }
void chin(char s[]) { scanf("%s", s); }
void print(int a) { printf("%d\n", a); }
void llprint(long long a) { printf("%lld\n", a); }
void dprint(double a) { printf("%.10f\n", a); }
void print2(int a, int b) { printf("%d %d\n", a, b); }
/*
int max(int a, int b) { if (a>b) { return a; }return b; }
int min(int a, int b) { if (a<b) { return a; }return b; }
*/
long long llmax(long long a, long long b) { return a > b ? a : b; }
long long llmin(long long a, long long b) { return a < b ? a : b; }
double dmax(double a, double b) { return a > b ? a : b; }
int cmp(const void *a, const void *b) { return *(TYPE *)a - *(TYPE *)b; }
int cmp_r(const void *a, const void *b) { return *(TYPE *)b - *(TYPE *)a; }
int char_cmp(const void *a, const void *b) { return strcmp((char *)a, (char *)b); }
int char_cmp_r(const void *a, const void *b) { return strcmp((char *)b, (char *)a); }
void swap(int *a, int *b) { int t = *a; *a = *b; *b = t; }
//A
int main() {
int X, Y, K;
int ans;
scanf("%d %d %d", &X, &Y, &K);
if (K <= Y) { ans=X + (Y - K); }
if (K > Y) { ans=X + (Y - K) + Y; }
printf("%d\n", ans);
#ifdef DEBUGF
getch();
#endif
return 0;
}
Submission Info
Submission Time
2018-09-20 20:04:45+0900
Task
A - コインの反転
User
chonerie
Language
C (GCC 5.4.1)
Score
0
Code Size
2187 Byte
Status
WA
Exec Time
1 ms
Memory
128 KB
Compile Error
./Main.c: In function ‘in’:
./Main.c:34:23: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
int in(void) { int i; scanf("%d", &i); return i; }
^
./Main.c: In function ‘llin’:
./Main.c:35:37: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
long long llin(void) { long long i; scanf("%lld", &i); return i; }
^
./Main.c: In function ‘din’:
./Main.c:36:30: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
double din(void) { double i; scanf("%lf", &i); return i; }
^
./Main.c: In function ‘chin’:
./Main.c:37:23: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
void chin(char s[]) { scanf("%s", s); }
^
./Main.c: In function ‘main’:
./Main.c:64:2: warning: ignoring return value of ‘s...
Judge Result
Set Name
Sample
All
Score / Max Score
0 / 0
0 / 100
Status
Set Name
Test Cases
Sample
sample_01.txt, sample_02.txt, sample_03.txt
All
sample_01.txt, sample_02.txt, sample_03.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt, subtask1_16.txt, subtask1_17.txt, subtask1_18.txt, subtask1_19.txt, subtask1_20.txt, subtask1_21.txt, subtask1_22.txt, subtask1_23.txt, subtask1_24.txt, subtask1_25.txt, subtask1_26.txt, subtask1_27.txt, subtask1_28.txt, subtask1_29.txt, subtask1_30.txt, subtask1_31.txt, subtask1_32.txt
Case Name
Status
Exec Time
Memory
sample_01.txt
AC
1 ms
128 KB
sample_02.txt
AC
1 ms
128 KB
sample_03.txt
AC
0 ms
128 KB
subtask1_01.txt
WA
1 ms
128 KB
subtask1_02.txt
AC
1 ms
128 KB
subtask1_03.txt
WA
0 ms
128 KB
subtask1_04.txt
AC
0 ms
128 KB
subtask1_05.txt
AC
0 ms
128 KB
subtask1_06.txt
AC
0 ms
128 KB
subtask1_07.txt
WA
1 ms
128 KB
subtask1_08.txt
WA
0 ms
128 KB
subtask1_09.txt
WA
1 ms
128 KB
subtask1_10.txt
AC
1 ms
128 KB
subtask1_11.txt
WA
0 ms
128 KB
subtask1_12.txt
WA
1 ms
128 KB
subtask1_13.txt
WA
1 ms
128 KB
subtask1_14.txt
AC
1 ms
128 KB
subtask1_15.txt
AC
1 ms
128 KB
subtask1_16.txt
AC
1 ms
128 KB
subtask1_17.txt
AC
1 ms
128 KB
subtask1_18.txt
AC
0 ms
128 KB
subtask1_19.txt
WA
1 ms
128 KB
subtask1_20.txt
WA
1 ms
128 KB
subtask1_21.txt
WA
1 ms
128 KB
subtask1_22.txt
AC
0 ms
128 KB
subtask1_23.txt
AC
1 ms
128 KB
subtask1_24.txt
AC
1 ms
128 KB
subtask1_25.txt
AC
1 ms
128 KB
subtask1_26.txt
AC
1 ms
128 KB
subtask1_27.txt
AC
1 ms
128 KB
subtask1_28.txt
AC
1 ms
128 KB
subtask1_29.txt
AC
1 ms
128 KB
subtask1_30.txt
WA
1 ms
128 KB
subtask1_31.txt
AC
1 ms
128 KB
subtask1_32.txt
WA
1 ms
128 KB