結果
| 問題 | No.2706 One Nafmo | 
| コンテスト | |
| ユーザー |  vjudge1 | 
| 提出日時 | 2024-04-23 21:24:15 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 337 bytes | 
| コンパイル時間 | 1,739 ms | 
| コンパイル使用メモリ | 192,000 KB | 
| 最終ジャッジ日時 | 2025-02-21 08:45:19 | 
| ジャッジサーバーID (参考情報) | judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 4 | 
| other | WA * 9 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:8:16: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |         freopen(taskname ".inp", "r", stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:9:16: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |         freopen(taskname ".out", "w", stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
#define taskname ""
    if (fopen(taskname ".inp", "r"))
    {
        freopen(taskname ".inp", "r", stdin);
        freopen(taskname ".out", "w", stdout);
    }
    cin.tie(0)->sync_with_stdio(0);
    int A,B,X;
    cin>>A>>B>>X;
    long long ans=(X+A-1)/A*B;
    return 0;
}
            
            
            
        