結果
| 問題 |
No.350 d=vt
|
| コンテスト | |
| ユーザー |
koyumeishi
|
| 提出日時 | 2016-03-11 22:49:48 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 947 bytes |
| コンパイル時間 | 671 ms |
| コンパイル使用メモリ | 90,040 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-05 03:59:43 |
| 合計ジャッジ時間 | 1,104 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:26:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
26 | scanf("%d.%d %d", &v0,&v1,&t);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <iostream>
#include <vector>
#include <cstdio>
#include <sstream>
#include <map>
#include <string>
#include <algorithm>
#include <queue>
#include <cmath>
#include <functional>
#include <set>
#include <ctime>
#include <random>
#include <chrono>
using namespace std;
template<class T> istream& operator >> (istream& is, vector<T>& vec){for(T& val: vec) is >> val; return is;}
template<class T> istream& operator , (istream& is, T& val){ return is >> val;}
template<class T> ostream& operator << (ostream& os, const vector<T>& vec){for(int i=0; i<vec.size(); i++) os << vec[i] << (i==vec.size()-1?"":" "); return os;}
template<class T> ostream& operator , (ostream& os, const T& val){ return os << " " << val;}
template<class T> ostream& operator >> (ostream& os, const T& val){ return os << " " << val;}
int main(){
int v0,v1;
int t;
scanf("%d.%d %d", &v0,&v1,&t);
int ans = v0*t + v1*t/10000;
cout << ans << endl;
return 0;
}
koyumeishi