結果
問題 | No.1033 乱数サイ |
ユーザー | Baxi-codes |
提出日時 | 2020-04-24 23:14:24 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 277 bytes |
コンパイル時間 | 1,599 ms |
コンパイル使用メモリ | 166,236 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-10-15 03:47:23 |
合計ジャッジ時間 | 6,633 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
10,624 KB |
testcase_01 | WA | - |
testcase_02 | AC | 2 ms
5,248 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | AC | 2 ms
6,820 KB |
testcase_06 | AC | 2 ms
5,248 KB |
testcase_07 | WA | - |
testcase_08 | AC | 2 ms
6,816 KB |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | TLE | - |
testcase_16 | -- | - |
コンパイルメッセージ
In file included from /home/linuxbrew/.linuxbrew/Cellar/gcc@12/12.3.0/include/c++/12/istream:39, from /home/linuxbrew/.linuxbrew/Cellar/gcc@12/12.3.0/include/c++/12/sstream:38, from /home/linuxbrew/.linuxbrew/Cellar/gcc@12/12.3.0/include/c++/12/complex:45, from /home/linuxbrew/.linuxbrew/Cellar/gcc@12/12.3.0/include/c++/12/ccomplex:39, from /home/linuxbrew/.linuxbrew/Cellar/gcc@12/12.3.0/include/c++/12/x86_64-pc-linux-gnu/bits/stdc++.h:54, from main.cpp:1: In member function 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>]', inlined from 'void solve()' at main.cpp:17:8: /home/linuxbrew/.linuxbrew/Cellar/gcc@12/12.3.0/include/c++/12/ostream:228:25: warning: 'sum' may be used uninitialized [-Wmaybe-uninitialized] 228 | return _M_insert(static_cast<double>(__f)); | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp: In function 'void solve()': main.cpp:8:15: note: 'sum' was declared here 8 | float sum; | ^~~
ソースコード
#include <bits/stdc++.h> #include<string> #include <algorithm> using namespace std; void solve(){ float n,k; float sum; cin>>n>>k; for (int i = 0; i <= n; ++i) { for (int j = 0; j < k; ++j) { sum += (1/((n+1)*k))*i; } } cout<<sum; } int main() { solve(); }