結果

問題 No.525 二度寝の季節
ユーザー shadowlink0122shadowlink0122
提出日時 2017-06-09 22:31:48
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 319 bytes
コンパイル時間 459 ms
コンパイル使用メモリ 64,480 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-22 15:17:10
合計ジャッジ時間 1,491 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 33
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:12:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   12 |   scanf("%lld:%lld",&n,&a);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <iostream>
#include <functional>
#include <algorithm>
#include <vector>
using namespace std;

typedef long long ll;
ll i,n,a,b,c,ans;
vector<ll> vec;

int main(){
  scanf("%lld:%lld",&n,&a);
  a += 5;
  if(a > 59){
    n += 1;
    a -= 60;
  }
  if(n > 23)n = 0;
  printf("%02lld:%02lld\n",n,a);
  return 0;
}
0