提出 #74944090


ソースコード 拡げる

#include<bits/stdc++.h>
#include<atcoder/all>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<deque>
using namespace std;
using namespace atcoder;
using ll = long long;
using pl = pair<ll, ll>;
using tu = tuple<int, int, int>;
const int inf = 2147483647;
const ll Linf = 9223372036854775807;
const ll Lmody = 998244353;

void waru(ll n, ll &c, vector<ll> &v){
    ll rem = n;
    for(int i = 2; i*i <= rem; i++){
        while(rem % i == 0 && rem >= i){
            v.push_back(i);
            rem = rem/i;
        }
    }
    if(rem > 1){
        v.push_back(rem);
    }
    return;
}

int main(){
    int n; cin >> n;
    vector<string> s(n); for(int i = 0; i < n; i++) cin >> s[i];
    for(int i = 0; i < n; i++) cout << s[n-i-1] << endl;
}

提出情報

提出日時
問題 A - Sequence of Strings
ユーザ Eggy
言語 C++23 (GCC 15.2.0)
得点 100
コード長 798 Byte
結果 AC
実行時間 1 ms
メモリ 3600 KiB

コンパイルエラー

./Main.cpp: In function 'void waru(ll, ll&, std::vector<long long int>&)':
./Main.cpp:17:21: warning: unused parameter 'c' [-Wunused-parameter]
   17 | void waru(ll n, ll &c, vector<ll> &v){
      |                 ~~~~^

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 2
AC × 11
セット名 テストケース
Sample 00_sample_00.txt, 00_sample_01.txt
All 00_sample_00.txt, 00_sample_01.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 02_max_00.txt, 02_max_01.txt, 02_max_02.txt, 03_min_00.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 1 ms 3600 KiB
00_sample_01.txt AC 1 ms 3556 KiB
01_random_00.txt AC 1 ms 3452 KiB
01_random_01.txt AC 1 ms 3580 KiB
01_random_02.txt AC 1 ms 3532 KiB
01_random_03.txt AC 1 ms 3548 KiB
01_random_04.txt AC 1 ms 3408 KiB
02_max_00.txt AC 1 ms 3396 KiB
02_max_01.txt AC 1 ms 3552 KiB
02_max_02.txt AC 1 ms 3536 KiB
03_min_00.txt AC 1 ms 3424 KiB