Code Formula 2014 本選

Submission #1590941

Source codeソースコード

#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#include<stdio.h>
#include<cmath>
#define FOR(i, a, b) for(int i=(a);i<=(b);i++)
#define RFOR(i, a, b) for(int i=(a);i>=(b);i--)
#define MOD 1000000007
using namespace std;

int main(void) {
	long long int n;
	long long int pos = 0;
	cin >> n;
	FOR(i, 1, n) {
		if (i % 2 == 1) {
			pos += 3;
		}
		else {
			pos -= 2;
		}
	}
	cout << pos << endl;
	return 0;
}

Submission

Task問題 B - 3歩進んで2歩下がる
User nameユーザ名 yukiteru
Created time投稿日時
Language言語 C++14 (GCC 5.4.1)
Status状態 WA
Score得点 0
Source lengthソースコード長 460 Byte
File nameファイル名
Exec time実行時間 ms
Memory usageメモリ使用量 -

Test case

Set

Set name Score得点 / Max score Cases
All 0 / 100 sample_01.txt,sample_02.txt,test_1.txt,test_1000000000000000.txt,test_111723.txt,test_130146966901509.txt,test_161925824289921.txt,test_35454587585157.txt,test_5.txt,test_5540.txt,test_6021.txt,test_805.txt,test_845717671383532.txt,test_865385763670868.txt,sample_01.txt,sample_02.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
sample_01.txt AC 1 ms 256 KB
sample_02.txt TLE
test_1.txt AC 1 ms 256 KB
test_1000000000000000.txt TLE
test_111723.txt AC 1 ms 256 KB
test_130146966901509.txt WA
test_161925824289921.txt WA
test_35454587585157.txt TLE
test_5.txt AC 1 ms 256 KB
test_5540.txt AC 1 ms 256 KB
test_6021.txt AC 1 ms 256 KB
test_805.txt AC 1 ms 256 KB
test_845717671383532.txt TLE
test_865385763670868.txt WA