ログインしてください。
提出 #821858
ソースコード 拡げる
#include <algorithm>
#include <array>
#include <complex>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
inline bool valid(const int x, const int r) { return 0 <= x && x < r; }
void initIOStream() {
ios::sync_with_stdio(false); // stdinなどと同期しない
cin.tie(0); // cinの前にflushしない
cout.setf(ios::fixed);
cout.precision(10); // 四捨五入して指定桁数表示
}
int main() {
initIOStream();
int sum = 0;
for(int i = 1; i <= 100; ++i){
if(i % 3 != 0 && i % 5 != 0){
sum += i;
}
}
cout << sum << endl;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | A - 天下一プログラマーゲーム |
| ユーザ | lawel3110 |
| 言語 | C++14 (GCC 5.4.1) |
| 得点 | 100 |
| コード長 | 965 Byte |
| 結果 | AC |
| 実行時間 | 4 ms |
| メモリ | 256 KiB |
ジャッジ結果
| セット名 | All | ||
|---|---|---|---|
| 得点 / 配点 | 100 / 100 | ||
| 結果 |
|
| セット名 | テストケース |
|---|---|
| All | no-input |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| no-input | AC | 4 ms | 256 KiB |