daylight-library

This documentation is automatically generated by competitive-verifier/competitive-verifier

View the Project on GitHub daylight-pro/daylight-library

:heavy_check_mark: test/aoj/others/1276.test.cpp

Depends on

Code

#define PROBLEM \
	"https://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1276"
#include "daylight/base.hpp"
#include "daylight/math/eratos.hpp"

int main() {
	int K;
	cin >> K;
	vb isPrime;
	eratos(1299710, isPrime);
	while(K != 0) {
		if(isPrime[K]) {
			cout << 0 << endl;
			cin >> K;
			continue;
		}
		int ans = 1;
		for(int i = K; !isPrime[i]; i++) {
			ans++;
		}
		for(int i = K - 1; !isPrime[i]; i--) {
			ans++;
		}
		cout << ans << endl;
		cin >> K;
	}
}
Traceback (most recent call last):
  File "/home/runner/.local/lib/python3.10/site-packages/competitive_verifier/oj_resolve/resolver.py", line 181, in resolve
    bundled_code = language.bundle(path, basedir=basedir)
  File "/home/runner/.local/lib/python3.10/site-packages/competitive_verifier/oj/verify/languages/cplusplus.py", line 252, in bundle
    bundler.update(path)
  File "/home/runner/.local/lib/python3.10/site-packages/competitive_verifier/oj/verify/languages/cplusplus_bundle.py", line 482, in update
    self.update(
  File "/home/runner/.local/lib/python3.10/site-packages/competitive_verifier/oj/verify/languages/cplusplus_bundle.py", line 477, in update
    raise BundleErrorAt(
competitive_verifier.oj.verify.languages.cplusplus_bundle.BundleErrorAt: daylight/base.hpp: line 103: unable to process #include in #if / #ifdef / #ifndef other than include guards

Test cases

Env Name Status Elapsed Memory
g++ judge_data :heavy_check_mark: AC 11 ms 4 MB
Back to top page