Submission #3472731


Source Code Expand

#include <bits/stdc++.h>
 
using namespace std;
using ll = long long;
// #define int ll
using PII = pair<int, int>;
 
#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
 
template<typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template<typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }
template<typename T> bool IN(T a, T b, T x) { return a<=x&&x<b; }
template<typename T> T ceil(T a, T b) { return a/b + !!(a%b); }

template<typename T> vector<T> make_v(size_t a) { return vector<T>(a); }
template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts) { 
  return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}
template<typename T,typename V> typename enable_if<is_class<T>::value==0>::type
fill_v(T &t, const V &v) { t=v; }
template<typename T,typename V> typename enable_if<is_class<T>::value!=0>::type
fill_v(T &t, const V &v ) { for(auto &e:t) fill_v(e,v); }

template<class S,class T>
ostream &operator <<(ostream& out,const pair<S,T>& a){
  out<<'('<<a.first<<','<<a.second<<')'; return out;
}
template<typename T>
istream& operator >> (istream& is, vector<T>& vec){
  for(T& x: vec) {is >> x;} return is;
}
template<class T>
ostream &operator <<(ostream& out,const vector<T>& a){
  out<<'['; for(T i: a) {out<<i<<',';} out<<']'; return out;
}

int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0}; // DRUL
const int INF = 1<<30;
const ll LLINF = 1LL<<60;
const ll MOD = 1000000007;

signed main(void)
{
  cin.tie(0);
  ios::sync_with_stdio(false);

  ll a, b, c;
  cin >> a >> b >> c;

  FOR(i, 1, 128) {
    if(i%3==a && i%5==b && i%7==c) {
      cout << i << endl;
    }
  }

  return 0;
}

Submission Info

Submission Time
Task A - 孫子算経
User ferin_tech
Language C++14 (GCC 5.4.1)
Score 100
Code Size 1772 Byte
Status AC
Exec Time 2 ms
Memory 384 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 63
Set Name Test Cases
All 00_sample1, 00_sample2, 00_sample3, 10_input00, 10_input01, 10_input02, 10_input03, 10_input04, 10_input05, 10_input06, 10_input07, 10_input08, 10_input09, 10_input10, 10_input11, 10_input12, 10_input13, 10_input14, 10_input15, 10_input16, 10_input17, 10_input18, 10_input19, 10_input20, 10_input21, 10_input22, 10_input23, 10_input24, 10_input25, 10_input26, 10_input27, 10_input28, 10_input29, 10_input30, 10_input31, 10_input32, 10_input33, 10_input34, 10_input35, 10_input36, 10_input37, 10_input38, 10_input39, 10_input40, 10_input41, 10_input42, 10_input43, 10_input44, 10_input45, 10_input46, 10_input47, 10_input48, 10_input49, 10_input50, 10_input51, 10_input52, 10_input53, 10_input54, 10_input55, 10_input56, 10_input57, 10_input58, 10_input59
Case Name Status Exec Time Memory
00_sample1 AC 1 ms 256 KB
00_sample2 AC 1 ms 256 KB
00_sample3 AC 1 ms 256 KB
10_input00 AC 1 ms 256 KB
10_input01 AC 1 ms 256 KB
10_input02 AC 1 ms 256 KB
10_input03 AC 1 ms 256 KB
10_input04 AC 1 ms 256 KB
10_input05 AC 1 ms 256 KB
10_input06 AC 1 ms 256 KB
10_input07 AC 1 ms 256 KB
10_input08 AC 1 ms 256 KB
10_input09 AC 1 ms 256 KB
10_input10 AC 1 ms 256 KB
10_input11 AC 1 ms 256 KB
10_input12 AC 1 ms 256 KB
10_input13 AC 1 ms 256 KB
10_input14 AC 1 ms 256 KB
10_input15 AC 1 ms 256 KB
10_input16 AC 1 ms 256 KB
10_input17 AC 1 ms 256 KB
10_input18 AC 1 ms 256 KB
10_input19 AC 1 ms 256 KB
10_input20 AC 1 ms 256 KB
10_input21 AC 1 ms 256 KB
10_input22 AC 1 ms 256 KB
10_input23 AC 1 ms 256 KB
10_input24 AC 1 ms 256 KB
10_input25 AC 1 ms 256 KB
10_input26 AC 1 ms 256 KB
10_input27 AC 1 ms 256 KB
10_input28 AC 1 ms 256 KB
10_input29 AC 1 ms 256 KB
10_input30 AC 1 ms 256 KB
10_input31 AC 1 ms 256 KB
10_input32 AC 1 ms 256 KB
10_input33 AC 1 ms 256 KB
10_input34 AC 1 ms 256 KB
10_input35 AC 1 ms 256 KB
10_input36 AC 1 ms 256 KB
10_input37 AC 1 ms 256 KB
10_input38 AC 1 ms 256 KB
10_input39 AC 1 ms 256 KB
10_input40 AC 1 ms 256 KB
10_input41 AC 1 ms 256 KB
10_input42 AC 1 ms 256 KB
10_input43 AC 1 ms 256 KB
10_input44 AC 1 ms 256 KB
10_input45 AC 1 ms 256 KB
10_input46 AC 1 ms 256 KB
10_input47 AC 1 ms 256 KB
10_input48 AC 1 ms 256 KB
10_input49 AC 1 ms 256 KB
10_input50 AC 1 ms 256 KB
10_input51 AC 1 ms 256 KB
10_input52 AC 1 ms 256 KB
10_input53 AC 1 ms 256 KB
10_input54 AC 1 ms 256 KB
10_input55 AC 1 ms 256 KB
10_input56 AC 1 ms 256 KB
10_input57 AC 1 ms 256 KB
10_input58 AC 2 ms 384 KB
10_input59 AC 1 ms 256 KB