AtCoder Beginner Contest 012

Submission #1071122

Source codeソースコード

#include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <vector>

#define FOR(i,k,n) for (int (i)=(k); (i)<(n); ++(i))
#define rep(i,n) FOR(i,0,n)
#define pb push_back
#define all(v) begin(v), end(v)
#define debug(x) cerr<< #x <<": "<<x<<endl
#define debug2(x,y) cerr<< #x <<": "<< x <<", "<< #y <<": "<< y <<endl

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vector<int> > vvi;
typedef vector<ll> vll;
typedef vector<vector<ll> > vvll;
template<class T> using vv=vector<vector< T > >;

int main() {
  int n;
  scanf("%d", &n);
  n = 2025 - n;
  FOR (i, 1, 10) {
    if (n % i == 0 && n/i <= 9) {
      printf("%d x %d\n", i, n/i);
    }
  }
  return 0;
}

Submission

Task問題 C - 九九足し算
User nameユーザ名 cyglef
Created time投稿日時
Language言語 C++11 (GCC 4.8.1)
Status状態 AC
Score得点 100
Source lengthソースコード長 1077 Byte
File nameファイル名
Exec time実行時間 19 ms
Memory usageメモリ使用量 924 KB

Compiler messageコンパイルメッセージ

./Main.cpp: In function ‘int main()’:
./Main.cpp:40:18: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
^

Test case

Set

Set name Score得点 / Max score Cases
All 100 / 100 test_1953.txt,test_1971.txt,test_1977.txt,test_1983.txt,test_1989.txt,test_1990.txt,test_1993.txt,test_1995.txt,test_1997.txt,test_1998.txt,test_2001.txt,test_2009.txt,test_2013.txt,test_2017.txt,test_2019.txt,test_2020.txt,test_2022.txt,test_2024.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
sample_01.txt AC 19 ms 800 KB
sample_02.txt AC 19 ms 800 KB
test_1953.txt AC 19 ms 796 KB
test_1971.txt AC 18 ms 792 KB
test_1977.txt AC 17 ms 796 KB
test_1983.txt AC 19 ms 800 KB
test_1989.txt AC 19 ms 924 KB
test_1990.txt AC 18 ms 672 KB
test_1993.txt AC 17 ms 924 KB
test_1995.txt AC 19 ms 800 KB
test_1997.txt AC 17 ms 800 KB
test_1998.txt AC 17 ms 924 KB
test_2001.txt AC 19 ms 800 KB
test_2009.txt AC 18 ms 792 KB
test_2013.txt AC 19 ms 800 KB
test_2017.txt AC 19 ms 800 KB
test_2019.txt AC 17 ms 796 KB
test_2020.txt AC 19 ms 672 KB
test_2022.txt AC 18 ms 796 KB
test_2024.txt AC 17 ms 796 KB