結果
問題 | No.652 E869120 and TimeZone |
ユーザー |
![]() |
提出日時 | 2018-02-23 22:37:06 |
言語 | C++11 (gcc 13.3.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 1,673 bytes |
コンパイル時間 | 846 ms |
コンパイル使用メモリ | 104,636 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-17 13:19:19 |
合計ジャッジ時間 | 2,032 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 29 WA * 1 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:63:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 63 | scanf("%d %d UTC%f", &a,&b,&s); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <iostream>#include <cstdio>#include <vector>#define _USE_MATH_DEFINES#include <math.h>#include <cstring>#include <numeric>#include <algorithm>#include <stdlib.h>#include <functional>#include <string>#include <list>#include <fstream>#include <iomanip>#include <array>#include <map>#include <queue>#include <limits.h>#include <set>#include <stack>#include <random>#include <complex>#include <unordered_map>#include <unordered_set>#include <chrono>#define rep(i,s,n) for(int i = (s); (n) > i; i++)#define REP(i,n) rep(i,0,n)#define RANGE(x,a,b) ((a) <= (x) && (x) <= (b))#define DUPLE(a,b,c,d) (RANGE(a,c,d) || RANGE(b,c,d) || RANGE(c,a,b) || RANGE(d,a,b))#define INCLU(a,b,c,d) (RANGE(a,c,d) && (b,c,d))#define PW(x) ((x)*(x))#define ALL(x) (x).begin(), (x).end()#define MODU 1000000007#define bitcheck(a,b) ((a >> b) & 1)#define bitset(a,b) ( a |= (1 << b))#define bitunset(a,b) (a &= ~(1 << b))#define MP(a,b) make_pair((a),(b))#define Manh(a,b) (abs((a).first-(b).first) + abs((a).second - ((b).second))#define pritnf printf#define scnaf scanf#define itn intusing namespace std;typedef long long ll;typedef pair<int, int> pii;typedef pair<ll, ll> pll;ll gcd(ll a, ll b) {if (b == 0) return a;return gcd(b, a%b);}template<typename A, size_t N, typename T>void Fill(A(&array)[N], const T &val) {std::fill((T*)array, (T*)(array + N), val);}struct Edge {int from, to;};signed main(){int a, b;float s;scanf("%d %d UTC%f", &a,&b,&s);int h = 0, m = (a-9) * 60 + b;m += s * 60;if (m < 0) {m += 60*24;}h = m / 60;m %= 60;h %= 24;printf("%02d:%02d\n", h,m);return 0;}